Skip to content

fix(skill-eval): filter safe-paths false-positives on markdown doc-link ../ (ag-eatf #safe-paths-doclink-filter)#796

Merged
boshu2 merged 1 commit into
mainfrom
fix/ag-eatf-safe-paths-doclink
Jun 6, 2026
Merged

fix(skill-eval): filter safe-paths false-positives on markdown doc-link ../ (ag-eatf #safe-paths-doclink-filter)#796
boshu2 merged 1 commit into
mainfrom
fix/ag-eatf-safe-paths-doclink

Conversation

@boshu2
Copy link
Copy Markdown
Owner

@boshu2 boshu2 commented Jun 6, 2026

What

scripts/skill-eval.sh treated ms's safe-paths rule as blocking on every ../. That rule is a blunt regex, and ../ relative markdown doc-links are the repo-wide SKILL.md convention (47+ skills, e.g. [x](../other/SKILL.md), ../../docs/...md). SKILL.md is documentation, not executed code, so those are false positives — they redded skill-evalsummary on every skills-touching PR (blocked #776; gated #759/#764/#767 in this session's drain).

Fix

Added a file-level filter: safe-paths stays blocking only when a ../ survives stripping (1) markdown inline-link targets ](...) and (2) relative doc-path tokens (*.md/.markdown/.mdx/.txt/.rst) — i.e. a real, non-doc ../. Otherwise the findings downgrade to advisory annotations (announced, not silenced).

Net effect: purely removes false positives; real protection is preserved. A genuine traversal (e.g. ../../../../etc/passwd in a description) still blocks — verified. No regression to the other blocking rules.

Evidence

  • bats tests/scripts/skill-eval.bats → 12/12 pass (10 prior + 2 new ag-eatf cases: doc-links downgrade→PASS; real non-doc ../→BLOCK).
  • Manual: agent-native and domain skills (previously red on safe-paths) now PASS; a mixed real-threat fixture BLOCKs.

Closes-scenario: ag-eatf#safe-paths-doclink-filter
Bounded-context: BC2-Validation
Evidence: scripts/skill-eval.sh

…nk ../ (ag-eatf)

The safe-paths ms rule is a blunt regex flagging every ../, including the
relative markdown doc-links that are the repo-wide SKILL.md convention (47+
skills). SKILL.md is documentation, not executed, so a ../ inside a markdown
link target or relative doc-path is not a real traversal threat — it red the
gate on every skill-touching PR (blocked #776, gated #759/#764/#767).

Filter keeps safe-paths blocking ONLY when a ../ survives stripping markdown
link targets + relative doc-path tokens (i.e. a real non-doc ../). Real
threats (e.g. ../../etc/passwd in a description) still block; doc-links
downgrade to advisory. +2 bats cases proving both directions.
@github-actions github-actions Bot added the tests label Jun 6, 2026
@boshu2 boshu2 merged commit fec947b into main Jun 6, 2026
15 of 16 checks passed
@boshu2 boshu2 deleted the fix/ag-eatf-safe-paths-doclink branch June 6, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant