Repository navigation
fix(security): correct defects found while optimizing the security skills - #1444
Merged
Merged
Conversation
…ills Behaviour fixes found during the #1344 optimization, kept apart from the behaviour-preserving PRs below this one. Correctness: - security-issue-import: Steps 2a and 2c skipped candidates by a class that is only assigned in Step 3, so the skip could never apply as written. They now skip on a provisional class read from the root message they already load, still extract the keywords Step 2b reuses, and run the skipped searches after Step 3 if the final class turns out to be a report. - security-issue-fix: 5c allowed vulnerability-class names (SSRF, path traversal) in a public PR, while AGENTS.md embargoes the vulnerability class and the agent-guard guard already blocked them. 5c is now the one list that 5g, Step 7, Step 9 and the Guardrails check against. The guard is mentioned as a backstop that does not match the bare words `vulnerability` / `advisory`, which rely on the manual check. - security-cve-allocate: Step 5.1 rewrote the whole issue body where Step 4.1 proposes a one-field `github-body-field set`. It now applies exactly what was proposed. - security-issue-sync Step 0 said PonyMail "degrades quietly", while its gate is a hard stop when the backend is `mandatory: yes`. - security-issue-invalidate: the `invalidate proposed` query matched any proposal that mentioned INVALID; it now matches the proposal line. Its Gmail backend guidance now points at the single selection rule in tools/gmail, and a stale `.claude/skills/...` link is fixed. - security-tracker-stats-dashboard ignored the configured cache directory, so the freshness check could read a different directory than the fetch wrote. - workflow-security-audit hid zizmor failures with `2>/dev/null`, so an unscanned repository could be reported as clean. Pre-flight coverage: triage, invalidate, model-update and import-from-md now declare config files they cannot run without, so pre-flight catches a missing file before the run starts. Project-neutrality: removed hardcoded release numbers, a backport label, a list of maintainer names, an Airflow canned-response list and a real CVE id from generic skills; release data now comes from <project-config>/release-trains.md. Scratch files: literal /tmp paths, which the secure setup's sandbox cannot write, are now `<scratch>` (the session scratch directory, absolute, so `gh` running outside the sandbox resolves the same file). Stale text: wrong class, field and outcome counts; references to steps and AGENTS.md sections that do not exist. Generated-by: Claude Code (Opus 5.5)
…mend-latest and fold (#1442) github-rollup only recognised a rollup whose first line began with `<!-- airflow-s status rollup v`, and wrote that marker on every new rollup. On any other adopter's tracker it would miss the existing rollup, create a second one, and label it with another project's name. - Detection now matches `<!-- <any-name> status rollup v<N>`. A new rollup's marker names the tracker repository, which reproduces the existing `airflow-s` marker on that tracker. - The comment's REST id is read from its `#issuecomment-<id>` URL instead of paginating every comment in the repository. - `amend-latest` replaces the body of the most recent entry, keeping its date and user, and refuses when that entry has a different action. It serves passes that fill in a value (such as a draft id) after writing their entry. - `fold` moves a legacy bot comment into the rollup under its original date and author, left-trims it, and deletes the original only after the append succeeded. - tools/github/status-rollup.md drops the hardcoded marker and the hand-rolled read/concatenate/PATCH script. The tool is the recipe, so the rollup body stays out of the agent's context. - preflight-audit's no-op classifier only knew the `apache-magpie:` skill marker, so a fresh rollup append looked like human activity and the tracker was dispatched instead of skipped. It now also recognises the rollup marker. Generated-by: Claude Code (Opus 5.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the security family optimization (#1344, after #1435–#1438, which only moved bytes, tightened descriptions, or pointed at shared recipes). This PR has two commits:
main, so it lands here.Correctness
automated-scanner,spam, …) that is only assigned in Step 3, so the skip could not apply as written.SSRF,path traversal) in a public PR. AGENTS.md embargoes "the vulnerability class", and the agent-guard guard already blocked those names.vulnerability/advisory: adding them would block ordinary PRs everywhere the guard runs.github-body-field set. It now applies exactly what was proposed.mandatory: yes. Step 0 now states both cases.invalidate proposedmatched any triage proposal that mentioned INVALID, including "not INVALID". It now matches the proposal line itself.tools/gmail..claude/skills/...link is fixed.2>/dev/null, so an unscanned repository could be reported as clean. Exit codes 11–14 (findings) are expected; any other non-zero exit is reported as a scan failure.Pre-flight coverage
requires_config:now declares files the skill cannot run without:release-trains.md,canned-responses.mdcanned-responses.mdsecurity-model.mdproject.mdThe security family README's config table is regenerated.
Project-neutrality
Removed from generic skills: hardcoded release numbers, a backport label, a list of maintainer names, an Airflow canned-response inventory, and a real CVE id. Release data now comes from
<project-config>/release-trains.md, and canned-response names from<project-config>/canned-responses.md.Scratch files
Literal
/tmp/...paths, which the secure setup's sandbox cannot write, are now<scratch>/...: the session scratch directory as an absolute path, so aghrunning outside the sandbox resolves the same file.Stale text
Fixed: wrong class, field and outcome counts ("five classes", "nine fields", "four outcomes"), a reference to a non-existent Step 7g, and a pointer to an AGENTS.md section that does not exist.
Test plan
prek run --all-files, including lycheeskill-and-tool-validate,check-skill-configtools/agent-guardtestsissue-fix/step-5ccase 3, which expects bothsecurity fixandsecurity;invalidate/step-4cases 1–3;import/step-2acase 3 andstep-5case 3).Found, not changed
descriptionstill say the tracker link must never appear in the public PR, which contradicts AGENTS.md (tracker identifiers are public-safe) and 5c. Changing the description movessurface_hash, so it is left for a decision.step-3-classifyeval uses an older five-class static prompt.github-rollup (commit 2, reviewed as #1442)
<!-- <name> status rollup v<N>marker, and names the tracker repository in new ones, instead of hardcodingairflow-s.amend-latestandfold.tools/github/status-rollup.mdis generic and tool-first.Part of #1344.
Generated-by: Claude Code (Opus 5.5)
🤖 Generated with Claude Code