Repository navigation
feat: configuration secrets and coverage - #57
Merged
Merged
Conversation
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.
Summary
Two more recommendations of the manual audit under
tests-project/: secrets in configuration files, and a coverage metric that tells "no findings" from "nothing analysed".test: define configuration-file secrets and analysis coverage), implementation follows.config-secrets, a project plugin: the key-value pairs of.env, YAML, TOML, JSON, INI and properties files under the project root are judged with the same provider patterns, credential names and entropy rule as Python literals, one finding per value with a redacted preview. Virtual environments and tooling directories are skipped, files are decoded by their byte order mark, and Python files stay with the module detector. The provider patterns and credential names move to theSecretDetectorbase as defaults so both plugins share them. This is what finds the Bearer tokens in MiniBookApiServer's Insomnia export, a UTF-16 YAML file.Coverage: per file,analysed,syntax-errororunreadable, with the functions found and the functions lowered.ProjectAnalysisand the newengine.analyze_filecarry it,Reportrenders it, as a last line in text (coverage: 2/4 files, 3/4 functions) and as a block with per-file detail in JSON. Existing expectations on the text output gain that line.source.decode_texthonours UTF-8 and UTF-16 byte order marks for every file the engine reads, Python sources and manifests included; the manifest-only helper goes away.ProjectContext.rootandinterprocedural.discover_filesgive project plugins the same file discovery the engine uses.Left from the audit: plaintext password storage and private data served from
static.