Repository navigation
tests(skill-validator): cover collection utilities, predicates, and main CLI - #237
Merged
Merged
Conversation
…ain CLI
37 new tests across 7 classes:
- is_placeholder_url: angle-bracket tokens, ellipsis, real URLs, empty
- line_has_inline_allow_marker: known markers, plain lines, empty
- is_path_allowlisted: README/AGENTS, projects/_template, .github/,
skill files and arbitrary docs are not allowlisted
- collect_files_to_check: md files returned, missing dir → [], non-md
excluded, recurses into subdirs
- collect_skill_dirs: immediate child dirs returned, missing dir → {},
files excluded, paths are absolute
- collect_doc_files: docs/ and projects/_template/ both scanned, missing
dirs → {}, non-md excluded, paths are absolute
- main: returns 0 on valid skills, 1 on hard violations with message,
--skip-categories filters violations, --strict promotes soft to hard
https://claude.ai/code/session_01WEx58ofmTyCe2YhCppV3qN
vincbeck
pushed a commit
to vincbeck/airflow-steward
that referenced
this pull request
May 26, 2026
…search (apache#149) Adds two pre-classification steps to security-issue-triage: Step 2.5 — Apply the Security Model verbatim. The classifier must quote the relevant 2-3 sentences of the project's Security Model and explain how the tracker maps to (or escapes) that wording. A trust-boundary cheat-sheet codifies the common attacker/target combinations into default dispositions, so the classifier cannot skip the boundary analysis silently. Step 2.6 — Closed-tracker precedent search. Extends the existing fuzzy-dup search (Step 2a in security-issue-import) to look for closed 'invalid' / 'not CVE worthy' / 'duplicate' trackers — and CVE-allocated positive precedents — for the same fuzzy keys. A STRONG rejection precedent lowers proposal confidence and often swings the disposition from VALID to NOT-CVE-WORTHY. Motivation: a 2026-05-14 triage sweep against airflow-s/airflow-s got 8 of 9 trackers' first-pass classification wrong — proposed VALID for cases that had direct NOT-CVE-WORTHY precedents (e.g. airflow-s#258 for the __classname__→import_string pattern, airflow-s#215/apache#237 for cross-DAG-read via Execution API). The misclassifications were only caught after the human triager pushed back twice asking the assistant to read the Security Model deeply and check past similar issues. This PR codifies both as mandatory pre-classification steps. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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.
37 new tests across 7 classes filling the remaining coverage gaps in
test_validator.py.Changes
tests/test_validator.py— new test cases covering:is_placeholder_url— angle-bracket tokens, ellipsis, real URLs, emptyline_has_inline_allow_marker— known markers, plain lines, emptyis_path_allowlisted— README/AGENTS, projects/_template, .github/; skill files and arbitrary docs are not allowlistedcollect_files_to_check— md files returned, missing dir →[], non-md excluded, recurses into subdirscollect_skill_dirs— immediate child dirs returned, missing dir →{}, files excluded, paths are absolutecollect_doc_files— docs/ and projects/_template/ both scanned, missing dirs →{}, non-md excluded, paths are absolutemain— returns 0 on valid skills, 1 on hard violations with message,--skip-categoriesfilters violations,--strictpromotes soft to hard