justinmclean opened a new pull request, #218:
URL: https://github.com/apache/airflow-steward/pull/218

   ## What
   
   Adds a `validate_lowercase_f_field` check to the skill-validator and
   remediates the two skills it flags.
   
   ### skill-validator
   
   New soft check (`lowercase-f-field` category) that fires when a skill's
   fenced code block contains a `gh` call using lowercase `-f` with an
   inline quoted value on a susceptible field (`title`, `body`,
   `description`, `name`, `label`, `milestone`). These fields commonly
   carry attacker-controlled content; passing them as inline shell arguments
   exposes them to shell-tokeniser injection.
   
   Safe fields (`state`, `query`, `oid`, `type`, `sort`) and the canonical
   example in `write-skill/security-checklist.md` are excluded. Prose
   mentions outside fenced blocks are ignored. The check is soft — it warns
   by default and only fails under `--strict`.
   
   Closes the automated coverage gap for Pattern 2 in
   `write-skill/security-checklist.md`.
   
   ### Skill remediations
   
   **`security-issue-fix`** — milestone create call in § 9a now uses the
   Write-tool-then-`-F field=@file` pattern for `title` and `description`,
   consistent with `security-issue-import-from-pr`.
   
   **`security-issue-sync`** — both the core/chart and provider-wave
   milestone create calls updated the same way. The indented fenced blocks
   here were not caught by the validator (pre-existing `_FENCED_CODE_RE`
   gap for indented fences), so this fix was applied manually after a
   `grep`-based audit.
   
   `-f state=open` and `-f due_on=` are left as `-f` — `state` is a static
   framework value, `due_on` is a date string not on the susceptible-fields
   list.
   
   ## Tests
   
   - 13 new unit tests in `TestLowercaseFField`
   - Validator run across all 27 `SKILL.md` files — zero violations after
     remediation
   - `skill-evals/security-issue-sync/step-2b-proposed-changes` prompt
     construction verified: heading still resolves, updated `-F` pattern
     present, no fixture `expected.json` files reference the changed bash
     commands
   
   ## Known gap
   
   `_FENCED_CODE_RE` does not match indented fenced blocks (e.g. fences
   inside list items). The four matches in `security-issue-sync` were found
   via grep and fixed manually. A follow-up to generalise
   `_FENCED_CODE_RE` to handle up to 3 spaces of indentation (CommonMark
   spec) would let the validator catch these automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to