feat(anonymisation-append-basis-summary-flag): implement spec (#154)#187
feat(anonymisation-append-basis-summary-flag): implement spec (#154)#187rubenvdlinde wants to merge 9 commits into
Conversation
chore: Merge development into main
Add optional appendBasisSummary boolean (default false) to per-document and batch anonymise endpoints. When true, calls GrondslagenSummaryService after the anonymised file is written. PDF mode appends a summary page; preserve mode writes a separate _grondslagen.pdf alongside and returns summaryFileId/summaryFilePath in the response. Summary failures surface as a structured warning field (HTTP 200) — the anonymised file is always preserved. Pre-change callers see no behaviour change. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Quality Report — ConductionNL/docudesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ✅ | ✅ 108/108 | |||
| npm | ❌ | ❌ | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-18 19:20 UTC
Download the full PDF report from the workflow artifacts.
Code Review — Juan Claude van DammeResult: FAIL (1 fix applied, 3 unfixed findings, 2 checks skipped) Fix Applied
Gate Results
Unfixed Findings[CRITICAL] Gate-7 — No-admin-IDOR: [CRITICAL] Gate-7 — No-admin-IDOR: [WARNING] Gate-14 — Route-reachability: gate-script false positive (9 methods) Checks Skipped
npm
Code Quality AssessmentThe
AdvisoriesMCP coverage (advisory) — This app does not yet publish an Out-of-scope inherited debt (informational)
🤖 Changes Juan Claude van Damme applied
View full diff · 10 files changed, 125 insertions(+) |
|
📍 [fixed: merge conflict resolved] Kept PR branch version 0.0.34-unstable.8 over development's 0.0.33 — feature branch version wins. |
|
📍 [unfixed: CRITICAL, security escalated to Clyde] gate-7-no-admin-idor: methods files(80), upload(116), extract(179), anonymize(215) carry @NoAdminRequired with no per-object ownership guard. Pre-existing on origin/development — not introduced by this PR. |
|
📍 [unfixed: CRITICAL, security escalated to Clyde] gate-7-no-admin-idor: methods batchUpload(101), folderBatch(136), batchExtract(178), batchStatus(199), batchEntities(250), batchAnonymize(303), batchReport(348), getProfiles(368), updateProfiles(382) carry @NoAdminRequired with no per-object ownership guard. Pre-existing on origin/development — not introduced by this PR. |
| * | ||
| * @NoAdminRequired | ||
| * @NoCSRFRequired | ||
| * |
There was a problem hiding this comment.
[unfixed: WARNING, gate false positive] gate-14-route-reachability: gate expects slug 'batchAnonymization#...' but Nextcloud uses snake_case 'batch_anonymization' for multi-word controller names. Routes ARE correctly defined in appinfo/routes.php. Gate-script limitation — not a real routing bug. Pre-existing on origin/development.
|
📍 [info] tryAppendBasisSummary() catch(\Throwable) is correct soft-failure behavior for a non-auth feature method — gate-8 correctly does not flag this (not an auth/permission resolver). |
Quality Report — ConductionNL/docudesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 108/108 | |||
| npm | ✅ | ✅ 529/529 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Coverage: 0% (0/10 statements)
Quality workflow — 2026-05-19 03:09 UTC
Download the full PDF report from the workflow artifacts.
…onymisation-append-basis-summary-flag
Security Review — Clyde BarcodeResult: PASS (0 fixed, 1 unfixed SUGGESTION, 0 blocking)
Findings[SUGGESTION] outputFormat lacks allowlist validation ( The Inherited debt (informational, non-blocking)
See inline comments for per-finding detail. 🤖 Changes Clyde Barcode appliedNone — review-only, no commits pushed to your branch. |
| } | ||
|
|
||
| if (isset($params['outputFormat']) === true) { | ||
| $outputFormat = (string) $params['outputFormat']; |
There was a problem hiding this comment.
[unfixed: SUGGESTION] Rule: OWASP A03:2021 — outputFormat accepted as any string without allowlist validation. Currently safe (only compared with === 'preserve', never used in file paths/OS calls), but recommend in_array(['pdf','preserve']) check at controller boundary with HTTP 400 on unknown values.
Quality Report — ConductionNL/docudesk @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 108/108 | |||
| npm | ✅ | ✅ 529/529 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Coverage: 0% (0/10 statements)
Quality workflow — 2026-05-19 03:22 UTC
Download the full PDF report from the workflow artifacts.
Closes #154
Summary
Auto-generated draft PR for OpenSpec change
anonymisation-append-basis-summary-flag.The Hydra builder ran the spec but could not run
gh pr createitself(Phase D+E credential strip — Claude has no
GH_TOKENby design).The entrypoint detected commits on the feature branch with no PR and
created this draft so the reviewer + security + applier can proceed.
Spec Reference
/spec//spec/proposal.md/spec/design.md/spec/tasks.mdCommits on this branch
Files changed
CHANGELOG.mddocs/features/anonymization.mdlib/Controller/AnonymizationController.phplib/Controller/BatchAnonymizationController.phplib/Service/AnonymizationService.phplib/Service/BatchAnonymizeService.phpopenspec/changes/anonymisation-append-basis-summary-flag/design.mdopenspec/changes/anonymisation-append-basis-summary-flag/tasks.mdtask-audit.jsontests/bootstrap-unit.phptests/stubs/NextcloudStubs.phptests/unit/Controller/AnonymizationControllerTest.phptests/unit/Service/AnonymizationServiceTest.phptests/unit/Service/BatchAnonymizeServiceTest.phpPR auto-created by Hydra builder entrypoint (
hydra_ensure_pr_exists)because Claude's session closed without running
gh pr create.Reviewer + applier follow as normal.