Skip to content

fix(security): plain gh keyword searches, and two stale or contradictory references - #1465

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/security-followups-a
Sep 28, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/security-followups-a

Conversation

@potiuk

@potiuk potiuk commented Sep 28, 2026

Copy link
Copy Markdown
Member

Follow-ups from the security-family optimization (#1344).

Summary

  • Plain gh keyword searches. security-issue-import Steps 2a, 2b and 2c, and import-from-md Step 2, ran KW=$(tr -cd … < file) and gh search … "$KW" as one command. Under the secure setup a gh in a command that also sets a variable stays sandboxed and fails.
    • Now tr -cd 'A-Za-z0-9._ -' cleans the keywords into a file as its own command, and the search is a plain gh call with the cleaned keywords single-quoted. That is safe because the allowlist admits no quote, $ or backtick.
    • The from-md step-2 eval now asserts that shape: a single-quoted cleaned keyword, no $(, and no $(gh gist create substitution. The old "no literal gh gist create anywhere" check was a false positive once the harmless cleaned text is inlined.
  • invalidate: the clickable-reference rule listed the reporter draft as a surface for tracker references, while Step 5d says the draft never mentions <tracker>. The rule now covers only <upstream> references in the draft.
  • sync: it pointed at a "Known release managers" subsection of AGENTS.md that no longer exists. It now points at <project-config>/release-trains.md § Release managers for releases currently relevant to the security tracker.

Test plan

  • Hooks on commit (changed files); skill-and-tool-validate
  • Evals before (main) and after, outside the sandbox:
    • import step-2a 6/6 on both sides.
    • import step-2b 2/4 on both sides, the same two cases, which already fail on main.
    • sync step-2c 4/4 and step-2b 10/10 on both sides.
    • from-md step-2 2/2 on three consecutive runs with the updated fixture.

Part of #1344.

Generated-by: Claude Code (Opus 5.5)

🤖 Generated with Claude Code

…ory references

- security-issue-import Steps 2a, 2b and 2c and import-from-md Step 2
  ran `KW=$(tr -cd … < file)` and `gh search … "$KW"` as one command.
  Under the secure setup a `gh` in a command that also sets a variable
  stays sandboxed and fails. The keywords are now cleaned into a file by
  `tr -cd` on its own, and the search is a plain `gh` call with the
  cleaned keywords single-quoted, which is safe because the allowlist
  admits no quote, `$` or backtick. The from-md step-2 eval asserts the
  new shape: single-quoted cleaned keyword, no `$(`, and no
  `$(gh gist create` substitution.
- security-issue-invalidate's clickable-reference rule listed the
  reporter draft as a surface for tracker references, while Step 5d says
  the draft never mentions `<tracker>`. The rule now covers only
  `<upstream>` references in the draft.
- security-issue-sync pointed at a "Known release managers" subsection
  of AGENTS.md that no longer exists. It now points at
  `<project-config>/release-trains.md` § Release managers for releases
  currently relevant to the security tracker.

Generated-by: Claude Code (Opus 5.5)
@potiuk potiuk added the family:security security-* skills label Sep 28, 2026
@potiuk
potiuk merged commit 752f2b2 into apache:main Sep 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:security security-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant