Repository navigation
docs: address 0.17.0 pre-release review - #424
Conversation
The recipe allowed GET on /api/* for any authenticated user, which also allows owner-only reads and permission listings. Give one rule per read that the patch protects, warn about wildcard objects, and test that a protected read stays 403 for other users (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
pymongo>=4.18.2 (CVE-2026-88029, CVE-2026-96747, CVE-2026-96748, CVE-2026-96749), requests>=2.33.0 (CVE-2026-25645) and Werkzeug>=3.1.9 (CVE-2026-27199, CVE-2026-102598), as checked against OSV (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Name the spec as other startup logs do, i.e., by its name if it has one, instead of listing its paths (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The weekly scan hard-coded elixircloud/foca; use the repository variable DOCKERHUB_ORG (default elixircloud) and the repository name, so that forks scan their own images (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Documented named overlays failed on the list-form examples; give their specs and policies as named entries, as the app template does (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Images without setuptools and wheel, chart 0.2.0 upgrade checklist, broker StatefulSet and claim lifecycle, grant_role() semantics, new features and dependency floors; linked from the changelog, the docs navigation and the README (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- deployment: named entries instead of "lists are replaced" for specs and policies; credentials of persisted databases and brokers; what the image scans cover. - chart: null across values files, inline patches, publication on GHCR, user name rotation of the bundled broker, first upgrade loses queued tasks; fix a stale template comment (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Scheduled runs have no event payload, so github.event.repository.name is empty there; take the name from GITHUB_REPOSITORY. Document that the scan takes the organization from a variable, the publishing workflows from a secret (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mention result-backend when renaming the broker user, reflow a paragraph, keep the pymongo comment above its line, and build the recipe test's path parameter per use (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mention the result-backend key when changing the broker password, too, and reflow the user name paragraph (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThis PR addresses the 0.17.0 pre-release review by narrowing the access-control recipe, adding and cross-linking migration and deployment guidance, making examples overlay-friendly through named entries, improving scheduled image-scan portability, and updating dependency and operational documentation with targeted tests. Sequence diagram for named configuration overlay mergingsequenceDiagram
participant BaseConfig
participant Overlay
participant FOCA
participant App
BaseConfig->>FOCA: load_config()
Overlay->>FOCA: merge named api.specs and policies
FOCA->>FOCA: validate_config()
alt named entries are compatible
FOCA->>App: start with merged configuration
else overlay switches a non-empty list to named entries
FOCA-->>App: refuse to start
end
Sequence diagram for narrowed authenticated read accesssequenceDiagram
actor User
participant API
participant AccessControl
User->>API: GET /api/items/:id
API->>AccessControl: authorize GET /api/items/:id
AccessControl-->>API: allow authenticated user
API-->>User: 200 response
User->>API: GET /api/items/:id/permissions
API->>AccessControl: authorize GET /api/items/:id/permissions
AccessControl-->>API: deny without owner role
API-->>User: 403 response
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #424 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 2869 2869
=========================================
Hits 2869 2869
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/helm-chart.md" line_range="576" />
<code_context>
+
+ ```bash
+ kubectl exec statefulset/my-app-broker -- \
+ rabbitmqctl add_user my-app-2 "${password}"
+ kubectl exec statefulset/my-app-broker -- \
+ rabbitmqctl set_permissions -p / my-app-2 ".*" ".*" ".*"
</code_context>
<issue_to_address>
**Broker password enters audit logs**
When an operator runs the username-rotation command and process listings or Kubernetes exec audit records are accessible to other readers, `kubectl exec` passes the expanded `${password}` to `rabbitmqctl add_user` as a command-line argument, exposing the credential in process listings and Kubernetes exec audit records to readers who lack Secret access.
Use a supported mechanism that supplies the password through stdin or a protected file instead of a command-line argument.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: docs/helm-chart.md:576
rabbitmqctl reads the password from standard input if it is not given, so that it does not show up in process listings and Kubernetes exec audit logs (Sourcery review of #424). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cover mongodb.persistence of foca-common 0.2.0 (#422): replacing volumeSize in app charts and deployments, and keeping the claim when switching to an existing claim (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The semgrep and ast-grep rules (with deliberately insecure test fixtures) and sgconfig.yml are not needed to build or test the package (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Breaking change of #423: stored configured rules are removed when policies is not set; atomic replacement, shared collections, rules of the permissions API, rolling updates and downgrades (#417). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Fixes findings of the 0.17.0 pre-release review (closes #417 by hand after merge, as
devis not the default branch).GETon/api/*, which also allows owner-only reads and permission listings. Now one rule per read that the patch protects (/api/items,/api/items/:id), with a warning about wildcard objects;tests/test_recipes.pychecks that a protected read stays403for other users (and that/api/*does allow it, as warned).api.specsandsecurity.access_control.policies, links to the named-entries section and mentions the startup error when an overlay switches a list to named entries.docs/migration-0.17.md(images without setuptools/wheel; chart 0.2.0 upgrade checklist; one-time loss of queued broker tasks on the Deployment to StatefulSet switch; claim lifecycle on uninstall, rollback and changes;grant_role()semantics; named entries, patches, Gateway API, supply chain verification, citation; dependency floors; MongoDB persistence of feat(chart): add persistence settings for MongoDB #422; the breaking change of configured policies of fix(access-control)!: replace policies atomically #423), linked from the changelog, the docs navigation, the docs index and the README.nullacross values files documented inhelm-chart.md(Values); the sentence inconfiguration/index.mdpoints there.deployment.mdreworded: the published images are rebuilt, not the scanned builds. A real fix (scan by digest before signing) is larger and left for a follow-up.pymongo>=4.18.2(CVE-2026-88029, CVE-2026-96747, CVE-2026-96748, CVE-2026-96749),requests>=2.33.0(CVE-2026-25645),Werkzeug>=3.1.9(CVE-2026-27199, CVE-2026-102598).deployment.md, user-name rotation of the bundled RabbitMQ inhelm-chart.md.scan.ymltakes the image from the variableDOCKERHUB_ORG(defaultelixircloud) andGITHUB_REPOSITORY(scheduled runs have no event payload)._broker.tplcomment; thedisable_authwarning logs the spec label.MANIFEST.inprunes.semgrep/,.ast-grep/andsgconfig.yml(from ci: add semgrep and ast-grep rules #416); checked withpython -m build --sdist.rabbitmqctlvia standard input, not as arguments.Verification
ruff check,ruff format --check,mypy: pass.coverage run -m pytest(Python 3.13, MongoDB on port 12345): 1808 passed (after merging dev), coverage 100%.uv pip install --resolution lowest-direct -e .[dev], Python 3.11, resolves pymongo 4.18.2, requests 2.33.0, Werkzeug 3.1.9): 1744 passed, 1 skipped.mkdocs build --strict: no warnings.pre-commit run --all-files: pass before merging ci: add semgrep and ast-grep rules #416; afterwardsast-grep scanandast-grep testpass, the semgrep hook could not be installed locally (proxy), so semgrep runs in CI only.helm lint --strictof the library and the petstore chart with all CI values,pytest charts/foca-common/tests: 193 passed (after merging dev).Declined review findings
DOCKERHUB_ORGin all workflows: the weekly scan needs no secrets, so it uses the variable;docs/contributing.mdand the workflow comment explain the difference.Open questions
None.
🤖 Generated with Claude Code