Skip to content

fix(preset.py): Enforce redacted secrets - #3136

Merged
liquidsec merged 4 commits into
blacklanternsecurity:devfrom
OAuthBringer:fix/presets
Jun 9, 2026
Merged

fix(preset.py): Enforce redacted secrets#3136
liquidsec merged 4 commits into
blacklanternsecurity:devfrom
OAuthBringer:fix/presets

Conversation

@OAuthBringer

@OAuthBringer OAuthBringer commented May 27, 2026

Copy link
Copy Markdown

Observed Behavior

Presets were dumping tokens to disk on every scan, specifically when using api_token credentials for github_org.

Expected Behavior

Presets should not dump secrets to text (by default), and this minimally should be configurable.

Notes

There may be some reason this is desirable behavior (repeat scan configurations etc), but in my case it was adding a lot of text drift and I at least wanted to turn it off locally. This was a very quick pass at patching things on my end. Happy to hear any feedback.

@liquidsec

liquidsec commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Hey! thanks for the PR. We agree that the current behavior of writing secrets should not be the default behavior. I just want to add a comment in the resulting preset.yml noting that the keys have been redacted, and instructing on how to reenable.

I'd also like this to be an actual config option - your change makes it option at the function level, but its currently not wired to anything.

Every run was printing API tokens directly to disk.
@ausmaster

Copy link
Copy Markdown
Contributor

Thanks very much for the PR @OAuthBringer !

@ausmaster
ausmaster self-requested a review June 9, 2026 01:27
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90%. Comparing base (1256454) to head (7311856).
⚠️ Report is 5 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #3136   +/-   ##
=====================================
+ Coverage     90%     90%   +1%     
=====================================
  Files        447     447           
  Lines      40462   40476   +14     
=====================================
+ Hits       36320   36335   +15     
+ Misses      4142    4141    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@liquidsec
liquidsec merged commit e418368 into blacklanternsecurity:dev Jun 9, 2026
17 of 18 checks passed
@liquidsec liquidsec mentioned this pull request Jun 9, 2026
@ausmaster ausmaster added this to the BBOT 3.0 - blazed_elijah milestone Jun 26, 2026
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.

3 participants