Skip to content

feat(security): run every security skill without project adoption - #1787

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/security-skills-solo-maintainer
Oct 24, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:feat/security-skills-solo-maintainer

Conversation

@potiuk

@potiuk potiuk commented Oct 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Every security skill works for a maintainer who installed Magpie for themselves, without the project adopting it. Pre-flight already resolved requires_config from the personal layer, but two tools only looked in the committed .apache-magpie-overrides/: vetted-ops (every tracker operation) and generate-cve-json (CVE JSON in cve-allocate, issue-sync, issue-deduplicate). Both now fall back to the personal layer (<git-common-dir>/apache-magpie/tools/…, legacy .apache-magpie-local/), committed first. setup config gains a step that drafts both for an unadopted project.
  • The personal vetted-ops policy is protected like the committed one. New required permissions.deny rules (//**/.git/**/apache-magpie/tools/vetted-ops/**, .svn/…, .apache-magpie-local/…), merged into the sandbox write-deny; vetted-ops reads a personal policy only in those protected shapes, and never through a symlink. The agent cannot write it — the user saves it from the draft.
  • Marketplace installs get the tools. magpie-security shipped only skills/, so <framework>/tools/<tool> did not exist without a framework checkout. New substrate plugin magpie-security-tools carries the tools the security skills run (packaged pyprojects drop the workspace-only dev group and point inter-tool deps at sibling copies). Its session hook materialises a writable copy per version at ~/.cache/apache-magpie/framework/<version> with current → it, so <framework> = ~/.cache/apache-magpie/framework/current and the skills' uv run --project <framework>/tools/<tool> … works unchanged (as does uvx --from). Setup installs it with magpie-security; pre-flight and upgrade name it when missing; Codex catalog included.
  • Wording: the <project-config> placeholder no longer claims to be the snapshot; user.md reads use the documented resolution order, and issue-fix never offers to save personal data into the committed overrides.

Type of change

  • Skill change (setup, isolated-setup-*, security skills' wording)
  • Python package (tools/vetted-ops, tools/cve-tool-vulnogram/generate-cve-json, tools/sandbox-lint, tools/security-management, tools/setup-preflight)
  • Cross-cutting (sandbox deny rules, AGENTS.md <framework>)
  • CI / dev loop (check-family-plugins.py packaging, hook filter, plugins/pyproject.toml exclusions)
  • Documentation

Test plan

  • prek run on every changed file passes
  • New tests: personal-layer policy lookup (committed wins, submodule, custom gitdir refused, symlinked layer refused), personal CVE-JSON config, packaged pyproject rewrite, tool coverage of the plugin, the framework-copy hook (writable, follows upgrades, concurrent starts, stale-lock recovery), the companion floor check
  • All packaged tools run with uv run --project, uv run --directory and uvx --from from a read-only copy of the plugin
  • Several rounds of roborev review, findings fixed

RFC-AI-0004 compliance

  • HITL — a personal policy is drafted, never written by the agent
  • Sandbox — new deny rules; the writable framework copy holds only tools that run sandboxed
  • Vendor neutrality — unchanged

Notes for reviewers

  • Not covered here: issue-invalidate's canned-response links point into the tracker repo, so a solo user's posted link can be dead; local-tracker custom parsers still read only the committed directory.

Gen-AI disclosure: drafted with Claude Code (Opus 5); reviewed by the submitter.

🤖 Generated with Claude Code

@github-actions github-actions Bot added family:security security-* skills family:setup setup-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs family:ci .github workflows, prek, validators capability:triage Sweep + classify + propose disposition capability:fix Implement code change to resolve an issue capability:intake Import external signal + sync tracker state capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement capability:reassess Re-run historical issues against current code capability:stats Read-only dashboards, metrics, governance evidence capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) capability:reconciliation Compare tracker state against external inventory; surface drift capability:authoring Skills that author or maintain other skills: write-skill, optimize-skill family:utilities utilities skills contract:cve-authority Tool capability: CVE allocation / record management / publication substrate:analytics Tool substrate: read-only metrics / dashboards / renderers substrate:sandbox Tool substrate: agent isolation, egress control, settings audit substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:setup Tool substrate: adopter-side setup state resolved at runtime (lock parsing, floors, fingerprints) labels Oct 24, 2026
@potiuk
potiuk enabled auto-merge (squash) October 24, 2026 21:21
A maintainer who installed Magpie for themselves passed pre-flight and
then stopped mid-run: vetted-ops and generate-cve-json only read the
committed .apache-magpie-overrides/. Both now fall back to the personal
layer; setup config drafts them. The personal vetted-ops policy gets
the same tamper protection as the committed one (new required deny
rules), and vetted-ops reads it only in those protected shapes and
never through a symlink.

A marketplace install had no <framework>/tools at all. The new
magpie-security-tools substrate plugin carries the tools the security
skills run; its session hook materialises a writable copy per version
at ~/.cache/apache-magpie/framework/<version> with `current` pointing
at it, so the skills' `uv run --project <framework>/tools/<tool>` works
unchanged. Setup installs it with magpie-security, and pre-flight and
upgrade name it when it is missing.

Wording: <project-config> no longer claims to be the snapshot, user.md
reads follow the documented order, and issue-fix never saves personal
data into the committed overrides.

Generated-by: Claude Opus 5
@potiuk
potiuk force-pushed the feat/security-skills-solo-maintainer branch from 5abe53e to 2f3925e Compare October 24, 2026 21:28
@github-actions github-actions Bot added the family:repo-health repo-health skills label Oct 24, 2026
@potiuk
potiuk merged commit c1a5a0a into apache:main Oct 24, 2026
20 checks passed
@potiuk
potiuk deleted the feat/security-skills-solo-maintainer branch October 24, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:authoring Skills that author or maintain other skills: write-skill, optimize-skill capability:fix Implement code change to resolve an issue capability:intake Import external signal + sync tracker state capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) capability:reassess Re-run historical issues against current code capability:reconciliation Compare tracker state against external inventory; surface drift capability:resolve Close-out: invalidate, dedupe, CVE allocate, announcement capability:stats Read-only dashboards, metrics, governance evidence capability:triage Sweep + classify + propose disposition contract:cve-authority Tool capability: CVE allocation / record management / publication family:ci .github workflows, prek, validators family:docs Docs, MISSION.md, READMEs family:repo-health repo-health skills family:security security-* skills family:setup setup-* skills family:tools tools/* family:utilities utilities skills substrate:analytics Tool substrate: read-only metrics / dashboards / renderers substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:sandbox Tool substrate: agent isolation, egress control, settings audit substrate:setup Tool substrate: adopter-side setup state resolved at runtime (lock parsing, floors, fingerprints)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant