Skip to content

Veles: Cloudflare API Token - #1457

Merged
copybara-service[bot] merged 11 commits into
google:mainfrom
devampkid:cloudflare-secret-detector
Feb 17, 2026
Merged

copybara-service[bot] merged 11 commits into
google:mainfrom
devampkid:cloudflare-secret-detector

Conversation

@devampkid

Copy link
Copy Markdown
Contributor

@erikvarga erikvarga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Apologies for delay and thanks for your patience throughout the PRP freeze. We're now resuming reviews of PRP PRs.

Comment thread enricher/enricherlist/list.go Outdated
Comment thread veles/secrets/cloudflareapitoken/cloudflareapitoken.go Outdated
Comment thread veles/secrets/cloudflareapitoken/detector.go Outdated
const maxTokenLength = 40

// envVarRe matches environment variable style assignments.
// Examples: CLOUDFLARE_API_TOKEN=token, CF_API_KEY="token"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In the GH Issue you mentioned that there are specific config files in which Cloudfare files are typically stored. Would it make sense to add an extractor that looks for token blobs in these files and return a Cloudfare secret?

You could add an extractor to extractors/filesystem/secrets similar to https://github.com/google/osv-scalibr/blob/main/extractor/filesystem/secrets/gitbasicauth/codecommit/codecommit.go where it wraps around a simpletoken struct but adds a FileRequired function to restrict it to certain files only.

Comment thread veles/secrets/cloudflareapitoken/validator.go

@erikvarga erikvarga left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Generally looks good now, only have a few minor comments

Comment thread binary/proto/config_go_proto/config.pb.go
Comment thread veles/secrets/cloudflareapitoken/detector_test.go
Comment thread extractor/filesystem/secrets/cloudflareapitoken/cloudflareapitoken.go Outdated
add TestDetectorAcceptance and use "/veles/secrets/common/pair" package for detection
@devampkid

Copy link
Copy Markdown
Contributor Author

@erikvarga HI
I also updated the detector to use /veles/secrets/common/pair package if you don't mind

Comment thread veles/secrets/cloudflareapitoken/detector.go Outdated
@copybara-service
copybara-service Bot merged commit 4072d75 into google:main Feb 17, 2026
13 of 14 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