Skip to content

Rewrite fake credentials and add narrow secret-scan configs - #23

Merged
imanimanyara merged 2 commits into
mainfrom
chore/secret-hygiene
Oct 8, 2026
Merged

imanimanyara merged 2 commits into
mainfrom
chore/secret-hygiene

Conversation

@imanimanyara

Copy link
Copy Markdown
Member

Summary

  • tests/Feature/EncryptionTest.php: API_TOKEN=plaintext-secret is now test-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 now test-secret-not-real and the DSN is assembled by concatenation, so the string under test is the same shape.
  • Appends tests/Fixtures/**/* to the existing .gitguardian.yaml ignored_paths and adds .gitleaks.toml (export-ignored). The existing ignored-matches entries and show-secrets are untouched.

On the hyphenated ignored-matches: ggshield (checked against v1.55.0, core/config/utils.py replace_dash_in_keys) accepts it, converting dashes to underscores, and prints a deprecation warning naming ignored_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 detect found no real secrets.

Verification

  • secret_scan.py check --ref HEAD: exit 0 (was 3 dummy findings).
  • pest (539 passed), phpstan, laranail-pint --test: clean locally.

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.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 12:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@imanimanyara
imanimanyara merged commit c13e7d7 into main Oct 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants