Skip to content

Constrain README license extraction and precedence - #129

Open
drk-ram wants to merge 1 commit into
GenAI-Security-Project:mainfrom
drk-ram:fix/readme-license-overcapture-128
Open

drk-ram wants to merge 1 commit into
GenAI-Security-Project:mainfrom
drk-ram:fix/readme-license-overcapture-128

Conversation

@drk-ram

@drk-ram drk-ram commented Nov 4, 2026

Copy link
Copy Markdown

Summary

  • keep README license matches on one line or in an explicit Markdown license section
  • normalize recognized SPDX identifiers while rejecting prose-only mentions
  • prioritize structured card metadata and repository license files over README guesses
  • add regressions for prose over-capture, section parsing, and source precedence

Validation

  • .venv\Scripts\python.exe -m pytest -q tests\test_readme_license_extraction.py — passed (5 tests)
  • .venv\Scripts\python.exe -m pytest -q — passed (full suite)
  • regression tests against origin/main — failed as expected (5 failures)

Fixes #128

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README license pattern over-captures following prose and shadows the LICENSE file (junk licenses[].license.name)

1 participant