Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret Token Validation feature #144

Merged
merged 47 commits into from
Sep 18, 2024
Merged

Conversation

barv-jfrog
Copy link
Contributor

@barv-jfrog barv-jfrog commented Aug 13, 2024

  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Depends on - jfrog/documentation#145
Depends on - jfrog/jfrog-client-go#991


Description - adding a flag --validate-secrets to jf audit and jf docker scan so secrets found will trigger token validation on XRAY. Token validation takes secrets that are api tokens for example amazon secret key and checks if this key is still valid on amazon side. The capability is identical to audit and docker scan.
What I do is I pass an env var to analyzermanager because analyzers contain an env variable which according to its value (true/false) turns on the Gadget which is responsible for token validation.
As you see, there are multiple options to pass this env var, first through flag --validate-secrets, second through env var defined in user setup, third XRAY API which exists only from 3.101.0. otherwise it returns False.


OLD PR - #128


image (8)

audit_test.go Outdated Show resolved Hide resolved
audit_test.go Outdated Show resolved Hide resolved
cli/docs/flags.go Outdated Show resolved Hide resolved
utils/resultwriter.go Outdated Show resolved Hide resolved
utils/resultstable_test.go Outdated Show resolved Hide resolved
jas/common_test.go Outdated Show resolved Hide resolved
utils/resultstable.go Outdated Show resolved Hide resolved
utils/resultstable.go Outdated Show resolved Hide resolved
tests/utils/test_validation.go Outdated Show resolved Hide resolved
scans_test.go Outdated Show resolved Hide resolved
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 12, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 12, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 12, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 12, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 16, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 16, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@barv-jfrog barv-jfrog added the safe to test Approve running integration tests on a pull request label Sep 17, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 17, 2024
Copy link

👍 Frogbot scanned this pull request and did not find any new security issues.


@eranturgeman eranturgeman merged commit be9cf8e into jfrog:dev Sep 18, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants