Repository navigation
Add CodeQL workflow with path exclusions for generated files - #3128
Merged
Merged
Conversation
Excludes nmdc_schema/nmdc.py, nmdc_schema/nmdc_pydantic.py, and nmdc_schema/migrators/partials/** from CodeQL scanning. The generated files account for ~892 of 903 Standard findings: 504 'not-named-self' (pydantic @field_validator methods correctly use cls) and ~380 'implicit string concatenation' from long description strings wrapped by linkml's pydanticgen. Migrator partials are versioned snapshots of released migrations. Closes #3040 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
GitHub's default code scanning setup reads .github/codeql/codeql-config.yml automatically. Adding an explicit codeql.yml workflow caused a SARIF upload conflict because both tried to upload results under the same category (/language:python). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Adds
.github/codeql/codeql-config.ymland.github/workflows/codeql.ymlto exclude generated artifacts from CodeQL scanning.The generated files account for about 892 of the 903 current Standard findings:
nmdc_schema/nmdc_pydantic.py— these are Pydantic v2@field_validatormethods that correctly usecls; CodeQL treats them as regular instance methods.nmdc_schema/nmdc_pydantic.pyandnmdc_schema/nmdc.py— linkml's pydanticgen wraps long description strings across lines without+, which is intentional.Migrator partials are also excluded; they are versioned snapshots of released migrations and should not be retroactively edited for style.
Closes #3040