Repository navigation
Rewrite fake credentials and add narrow secret-scan configs - #23
Merged
Merged
Conversation
API_TOKEN=plaintext-secret and a DSN with inline credentials read as secrets to a scanner. The tests now use test-secret-not-real, and the DSN is assembled by concatenation, so each still asserts the same round trip and redaction.
Append the named test fixture directory to ggshield's ignored_paths and add a gitleaks config allowlisting the same path, both written by agent-kit's secret_scan.py. The new gitleaks file stays out of the dist archive. Existing entries are unchanged; nothing under src/, no whole test tree and no detector is excluded.
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
tests/Feature/EncryptionTest.php:API_TOKEN=plaintext-secretis nowtest-secret-not-real; the round trip asserts the same absence and restoration.tests/Unit/SecretLeakTest.php: the redactor test used a DSN with inline credentials. The secret is nowtest-secret-not-realand the DSN is assembled by concatenation, so the string under test is the same shape.tests/Fixtures/**/*to the existing.gitguardian.yamlignored_pathsand adds.gitleaks.toml(export-ignored). The existingignored-matchesentries andshow-secretsare untouched.On the hyphenated
ignored-matches: ggshield (checked against v1.55.0,core/config/utils.pyreplace_dash_in_keys) accepts it, converting dashes to underscores, and prints a deprecation warning namingignored_matches. It works, so the spelling is left as it is.Secret-scan hygiene, approved by the owner as one PR per repository.
secret_scan.py detectfound no real secrets.Verification
secret_scan.py check --ref HEAD: exit 0 (was 3 dummy findings).