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.
imanimanyara
added a commit
that referenced
this pull request
Nov 7, 2026
This file carried `ignored-matches` and `show-secrets`. ggshield reads `ignored_matches` and `show_secrets`; a hyphenated key is not an alias. It parses as valid YAML, is simply not a key ggshield looks for, and the exemption it describes never applies — with no warning, because an unknown key is not an error. So all six placeholder exemptions added in #10 have been inert since 2026-09-17. Nothing surfaced it: the envkit_canary() change keeps new commits off the assignment-line shape the detector matches, so the exemptions were never the thing holding the scan green. The estate-wide pass in #23 converted `ignored-paths` to `ignored_paths` here and in 26 other configs, but could not know about the two keys only this file has. This file was the last hyphenated one in either org. Canonical spelling confirmed against GitGuardian's own configuration docs and ggshield's `.gitguardian.example.yml`, both of which use underscores throughout. The trap is recorded in the file so the next reader does not "tidy" it back.
imanimanyara
added a commit
that referenced
this pull request
Nov 7, 2026
`plaintext-secret` sat in the group headed "still on KEY=value lines in the current tree, so these are the entries actually doing work". It is not in the tree at all -- #23 removed it -- and survives only in three commits of history, so it belonged in the second group. An exemption whose stated reason is wrong is a licence rather than a ceiling. Re-measured every entry while here. The other five are correctly placed: `plaintext` is at EncryptCliTest.php:11 and `oldsecret` at AuditTest.php:128, both still on assignment lines; `hunter2`, `newsecret` and `redaction-canary-not-a-secret` are in the tree but on no assignment line. Each line now names where its value actually is.
imanimanyara
added a commit
that referenced
this pull request
Nov 7, 2026
* Record what the ggshield config does and does not reach The file is read by the ggshield CLI, so it governs a local or manual `ggshield secret scan`. It does not configure the GitGuardian GitHub App, whose check on a pull request is scanned server-side with its exemptions held in the dashboard -- which is why the 2026-11-07 finding had to be resolved there while this file already existed here. Measured the same day: no workflow runs ggshield, across 429 workflow files in laranail/packages and simtabi/packages plus the 8 reusable workflows in laranail/.github. The entries therefore have no consumer in CI today, so a green GitGuardian check is not evidence that one of them applied. Correcting the key spelling was still right; the note stops the next reader mistaking the file for a CI-level control. * Fix a wrong measurement in the exemption list `plaintext-secret` sat in the group headed "still on KEY=value lines in the current tree, so these are the entries actually doing work". It is not in the tree at all -- #23 removed it -- and survives only in three commits of history, so it belonged in the second group. An exemption whose stated reason is wrong is a licence rather than a ceiling. Re-measured every entry while here. The other five are correctly placed: `plaintext` is at EncryptCliTest.php:11 and `oldsecret` at AuditTest.php:128, both still on assignment lines; `hunter2`, `newsecret` and `redaction-canary-not-a-secret` are in the tree but on no assignment line. Each line now names where its value actually is.
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).