Repository navigation
Conversation
…nd matches `permission-audit`, and through it `setup verify` check 8d, told ASF projects using the security family to add `Bash(vulnogram-api-record-fetch *)` to their allow-list. No skill runs a command that starts with those words: the skills fetch CVE records with `uv run --project <framework>/tools/cve-tool cve-tool fetch ...` (and, before apache#2062, with `uv run --project ... vulnogram-api-record-fetch`), so the rule never matched. Projects that followed the advice were still prompted on every fetch, and in dontAsk mode the fetch was refused. Drop the recommendation, add a regression test, and record in the cve-tooling spec why no pattern pre-allows the fetch: the `<framework>` path differs per install, and under the secure setup the fetch also needs the Vulnogram token the sandbox hides. Generated-by: Claude Code (Opus 5.5)
Kaap10
left a comment
There was a problem hiding this comment.
Thanks @sjyangkevin for taking care of this follow-up from #2062!
The PR looks very solid:
- Removes dead advice: Dropping
Bash(vulnogram-api-record-fetch *)ensures we don't give adopters false confidence with a rule that never matchedcve-tool fetch. - Sound security choice: Avoiding broad wildcards over
<framework>paths is the right call for sandbox safety. - Good test coverage: The new regression test in
test_audit.pycleanly covers all organization profiles (None,independent,ASF). - Substrate parity: The mirror under
plugins/magpie-security-tools/is in sync, and all CI checks are green.
LGTM!
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
potiuk
left a comment
There was a problem hiding this comment.
Verified the claim: no skill runs a command starting with vulnogram-api-record-fetch (they go through a uv run --project <framework>/tools/… fetch whose path differs per install), so dropping the dead recommendation, documenting why no fixed pattern can replace it, and pinning it with a regression test is the right fix — thanks @sjyangkevin.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
Summary
This is a follow-up from #2062, which moved the security skills' CVE-record fetch behind
cve-tooland listed this issue as a known follow-up.Problem.
setup verify(check 8d) tells ASF projects that use the security skills to addBash(vulnogram-api-record-fetch *)to their allow-list. That rule matches no command the skills run. They fetch CVE records withuv run --project <framework>/tools/cve-tool cve-tool fetch …, and before #2062 they useduv run --project … vulnogram-api-record-fetch …, which did not match either.Why it matters. A project that follows the advice gets nothing for it. Every fetch still asks for approval, and in
dontAskmode the fetch is refused, so the skill stops. Advice that does not work also makes people trust the rest of the check less.Approach. Stop recommending the rule, and add a test to capture regression. We do not replace it with a matching rule, because the command's path differs per install and can point at code the agent is able to edit. The
cve-toolingspec records this as a known gap.Before / after. On
main, check 8d lists 13 recommended rules for an ASF project that uses the security skills, including the Vulnogram one. With this PR it lists the other 12 unchanged. Claude Code handles the fetch the same way as before, in every mode.Before
After
Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)tools/spec-loop/specs/cve-tooling.md, Known gaps)Test plan
prek run --all-filespassesuv run pytest/ruff check/mypypasses(
PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)(a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
setup verifycheck 8d in Claude Code against a throwaway ASF project with the security plugins, once onmainand once on this branch (screenshots above).Bash(vulnogram-api-record-fetch *)allowed, the skills' fetch command still asked for approval indefaultmode and was refused indontAskmode.setup/verify.md, and no eval step reads that file. The regression test lives inpermission-audit's pytest suite rather than in an eval fixture.RFC-AI-0004 compliance
<PROJECT>,<tracker>,<upstream>,<security-list>) used in all skill / tool prose (thecheck-placeholdersprek hook is the mechanical gate)Linked issues
related: #1800
Notes for reviewers (optional)