Repository navigation
ci(codeql): stop scanning tests/, the source of the recurring clear-text-logging false positives (#2130) - #2139
Merged
Merged
Conversation
…ext-logging false positives (#2130) py/clear-text-logging-sensitive-data and py/clear-text-storage-sensitive-data flagged pcapkit/ lines whose data flow began at a test fixture's `secrets` name, and each dismissal was lost when a pull request moved the line. - .github/codeql/codeql-config.yml: new; paths-ignore: [tests], nothing else. - codeql-analysis.yml: Initialize CodeQL reads it through config-file. - tests/project/test_codeql_config_2130.py: pins the input and the config. - docs/source/contributing/workflows.rst: CodeQL Configuration section.
Owner
Author
|
GOOD TO GO at
|
Contributor
|
Coverage: 91.55% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
Ready to merge at
This closes #2130. Afterwards, the next CodeQL analysis on |
4 of 5 tasks
5 tasks done
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
Closes #2130, taking option 1 as ruled there.
.github/codeql/codeql-config.ymlwithpaths-ignore: [tests], referenced fromcodeql-analysis.yml'sInitialize CodeQLstep withconfig-file:.tests/: every recurringpy/clear-text-logging-sensitive-data/-storage-alert inextraction.pyandcorekit/io.pytraces, in main's SARIF, to a pcapkit test fixture'ssecretsnames. Python is not built, so an ignored path is left out of the analysis. Both rules, and every other query, still run overpcapkit/.warnings.pyalert starts at the library's ownsecrets_lengthfield, so it still needs one manual dismissal.tests/project/test_codeql_config_2130.pypins that the init step passes exactly the config file and no inlineconfig, and that the config holds onlynameandpaths-ignore: ['tests']. It fails with the config removed, or with the earlierquery-filtersvariant.workflows.rst.main: thatpaths-ignoredropstests/from the CodeQL database, and so closes the alerts. The GitHub docs say it excludes the files "from analysis"; the next analysis onmainwill show it.