Skip to content

fix(permission-audit): drop a Vulnogram allow rule that never matches - #2079

Merged
potiuk merged 1 commit into
apache:mainfrom
sjyangkevin:fix/permission-audit-drop-dead-vulnogram-rule
Nov 15, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
sjyangkevin:fix/permission-audit-drop-dead-vulnogram-rule

Conversation

@sjyangkevin

Copy link
Copy Markdown
Contributor

Summary

This is a follow-up from #2062, which moved the security skills' CVE-record fetch behind cve-tool and listed this issue as a known follow-up.

Problem. setup verify (check 8d) tells ASF projects that use the security skills to add Bash(vulnogram-api-record-fetch *) to their allow-list. That rule matches no command the skills run. They fetch CVE records with uv run --project <framework>/tools/cve-tool cve-tool fetch …, and before #2062 they used uv 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 dontAsk mode 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-tooling spec 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

Screenshot from 2026-11-14 17-24-26

After

Screenshot from 2026-11-14 17-27-40

Type of change

  • Skill change (.claude/skills/<name>/) — eval fixtures updated below
  • Tool / bridge contract (tools/<system>/*.md)
  • Python package (tools/*/ with pyproject.toml)
  • Groovy reference impl
  • Cross-cutting (RFC, AGENTS.md, sandbox, privacy-LLM)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • Project template (projects/_template/)
  • CI / dev loop (prek, workflows, validators)
  • Other: : spec (tools/spec-loop/specs/cve-tooling.md, Known gaps)

Test plan

  • prek run --all-files passes
  • For Python packages touched: uv run pytest / ruff check / mypy passes
  • For Groovy bridges touched: command-line invocation tested end-to-end
  • For skill changes: eval suite passes for the affected skill
    (PYTHONPATH=tools/skill-evals/src python3 -m skill_evals.runner tools/skill-evals/evals/<skill>/)
  • For skill behaviour changes: a new or updated eval fixture is included in this PR
    (a regression test for the bug fixed / the behaviour added — see CONTRIBUTING.md)
  • Other:
    • Ran setup verify check 8d in Claude Code against a throwaway ASF project with the security plugins, once on main and once on this branch (screenshots above).
    • Reproduced the effect of the old advice in Claude Code. With only Bash(vulnogram-api-record-fetch *) allowed, the skills' fetch command still asked for approval in default mode and was refused in dontAsk mode.
    • No eval suite was run: the only skill edit removes one line from setup/verify.md, and no eval step reads that file. The regression test lives in permission-audit's pytest suite rather than in an eval fixture.

RFC-AI-0004 compliance

  • HITL — any new mutation is gated on explicit user confirmation
  • Sandbox — no new unrestricted host access; network reach declared in the adapter
  • Vendor neutrality — placeholders (<PROJECT>, <tracker>, <upstream>, <security-list>) used in all skill / tool prose (the check-placeholders prek hook is the mechanical gate)
  • Conversational + correctable — agentic-override path documented if behaviour is adopter-tunable
  • Write-access discipline — no autonomous outbound messages; drafts only, sent on confirmation
  • Privacy LLM — private content does not reach a non-approved LLM; redactor invoked where needed

Linked issues

related: #1800

Notes for reviewers (optional)

…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)
@github-actions github-actions Bot added family:setup setup-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) substrate:sandbox Tool substrate: agent isolation, egress control, settings audit family:dev Repo dev: .asf.yaml, spec-loop specs, Node manifests, .claude/settings.json labels Nov 14, 2026
@sjyangkevin sjyangkevin changed the title fix(permission-audit): avoid recommending an allow rule no skill comma… fix(permission-audit): drop a Vulnogram allow rule that never matches Nov 14, 2026
@sjyangkevin
sjyangkevin marked this pull request as ready for review November 14, 2026 22:48

@Kaap10 Kaap10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 matched cve-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.py cleanly 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 potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sjyangkevin

Copy link
Copy Markdown
Contributor Author

Thanks @potiuk , @Kaap10 for the effort and time to review!

@potiuk
potiuk merged commit 52e68d7 into apache:main Nov 15, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:dev Repo dev: .asf.yaml, spec-loop specs, Node manifests, .claude/settings.json family:docs Docs, MISSION.md, READMEs family:setup setup-* skills family:tools tools/* substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants