Skip to content

SK-3015: Move dummy/fake test secrets into dummy-non-secrets folder - #422

Open
Devesh-Skyflow wants to merge 1 commit into
mainfrom
SK-3015-gitleaks-dummy-secrets
Open

SK-3015: Move dummy/fake test secrets into dummy-non-secrets folder#422
Devesh-Skyflow wants to merge 1 commit into
mainfrom
SK-3015-gitleaks-dummy-secrets

Conversation

@Devesh-Skyflow

@Devesh-Skyflow Devesh-Skyflow commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes SK-3015 — Gitleaks flagged 5 findings (3x generic-api-key, 2x private-key) across the test suite for a shared dummy API key and fake PEM private keys.

Per the ticket's stated ignorance strategy, dummy/fake secrets now live in resource files under a dummy-non-secrets/ folder (per module), excluded from Gitleaks scans via a new path allowlist entry in Rule/gitleaks.toml, instead of as string literals/files directly in the scanned source tree.

Changes

  • Rule/gitleaks.toml: added dummy-non-secrets to the global path allowlist.
  • common/src/test/resources/dummy-non-secrets/invalidTokenURICredentials.json — moved from common/src/test/resources/ (reference in BearerTokenTests.java updated accordingly).
  • common/src/test/resources/dummy-non-secrets/invalidKeySpecCredentials.json — new; SignedDataTokensTests#testInvalidKeySpecInCredentials now loads it as a file instead of inlining the fake PEM key.
  • common/src/test/resources/dummy-non-secrets/dummy-api-key.txt and skyvault/src/test/resources/dummy-non-secrets/dummy-api-key.txt — new; CredentialsTests, ConnectionClientTests, and VaultClientTests now read the dummy API key from disk instead of hardcoding it.

Scope

Limited to the 5 findings named in the ticket. Other pre-existing occurrences of the same dummy secrets elsewhere in the test suite (already partly covered by existing // gitleaks:allow comments in some files) are left unchanged.

Testing

  • mvn -pl common,skyvault -am test-compile — clean compile.
  • mvn -pl common -am test -Dtest=CredentialsTests,SignedDataTokensTests,BearerTokenTests — all pass.
  • mvn -pl skyvault -am test -Dtest=ConnectionClientTests,VaultClientTests — all pass.

🤖 Generated with Claude Code

Gitleaks flagged 5 findings (generic-api-key x3, private-key x2) in test
code for a shared dummy API key and fake PEM private keys. Per the
ticket's ignorance strategy, dummy/fake secrets now live in resource
files under a dummy-non-secrets/ folder (per module), which is excluded
from Gitleaks scans via a new path allowlist entry in Rule/gitleaks.toml,
instead of as string literals in the .java source.

- common/src/test/resources/dummy-non-secrets/invalidTokenURICredentials.json
  (moved from src/test/resources/, reference in BearerTokenTests.java updated)
- common/src/test/resources/dummy-non-secrets/invalidKeySpecCredentials.json
  (new; SignedDataTokensTests#testInvalidKeySpecInCredentials now loads
  it as a file instead of inlining the fake PEM key)
- common/src/test/resources/dummy-non-secrets/dummy-api-key.txt and
  skyvault/src/test/resources/dummy-non-secrets/dummy-api-key.txt (new;
  CredentialsTests, ConnectionClientTests, and VaultClientTests now load
  the dummy API key from disk instead of hardcoding it)

Scope limited to the 5 findings named in SK-3015; other pre-existing
occurrences of the same dummy secrets elsewhere in the test suite are
unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.05%. Comparing base (3379566) to head (40a1572).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #422   +/-   ##
=======================================
  Coverage   92.05%   92.05%           
=======================================
  Files         158      158           
  Lines        6631     6631           
  Branches      893      893           
=======================================
  Hits         6104     6104           
  Misses        349      349           
  Partials      178      178           
Flag Coverage Δ
unittests-flowvault 90.58% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Module: common 88.72% <ø> (ø)
Module: skyvault 94.94% <ø> (ø)
Module: flowvault 90.25% <ø> (ø)
Service Account 87.36% <ø> (ø)
Vault Data 92.62% <ø> (ø)
Vault Tokens 99.03% <ø> (ø)
Vault Connection 100.00% <ø> (ø)
Vault Controller 85.36% <ø> (ø)
Detect 100.00% <ø> (ø)
Audit 100.00% <ø> (ø)
BIN Lookup 100.00% <ø> (ø)
Config 96.26% <ø> (ø)
Utils 90.99% <ø> (ø)
Errors 100.00% <ø> (ø)
Enums 100.00% <ø> (ø)
Logs 95.60% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3379566...40a1572. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant