Repository navigation
fix(baseline): recognize lowercase license and security policy file names - #730
Daniel-park10 wants to merge 1 commit into
Conversation
…ames (fixes darnitdevorg#717) - Add lowercase file variants to discover in OSPS-LE-01.01 and OSPS-LE-03.01 - Add lowercase and uppercase globs to OSPS-LE-02.01 regex pass - Add lowercase and directory variants to OSPS-VM-01.01, OSPS-VM-02.01, OSPS-VM-03.01, OSPS-VM-04.02, OSPS-VM-05.01, OSPS-VM-06.01, OSPS-BR-07.02, OSPS-SA-03.01, STAGE1-REF-SECURITY-01, and context.security_contact - Update detect_license_type() in auto_detect to recognize lowercase license files - Update FIELD_FILE_LOCATIONS in test_project_reference.py - Add regression tests covering all casing and directory variants, including sindresorhus/slash repository layout Signed-off-by: Daniel-park10 <dev10.tennyson@gmail.com>
bcd79f4 to
d7ca0ec
Compare
|
CI failure is the feature-036 golden, not the change: tests/darnit/fixtures/error_class_baseline/baseline.md snapshots an audit of a repo without a license, and OSPS-LE-03.01's 'None of the required files found' line now lists the lowercase names too. Please run |
Summary
GitHub recognizes lowercase filename conventions across repositories (such as
license,licence,copying, and.github/security.md). On repositories using lowercase naming likesindresorhus/slash, darnit currently fails license and security checks because locators, pattern matchers, and auto-detection functions only search for uppercase variants (LICENSE,SECURITY.md, etc.).This PR adds lowercase filenames and standard path variants (
.github/security.md,docs/security.md) across baseline license and security controls, hint sources, anddetect_license_type(). It also adds regression tests covering all casing and directory combinations, including the exactsindresorhus/slashlayout.Fixes #717
Type of Change
Framework Changes Checklist
If this PR modifies the darnit framework (
packages/darnit/):docs/architecture/framework-design.md) if behavior changeduv run python scripts/validate_sync.py --verboseand it passesControl/TOML Changes Checklist
If this PR modifies controls or TOML configuration:
Testing
uv run pytest tests/ -v)uv run ruff check .)AI assistance
Additional Notes
None.