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

feat: Added Secrets to the HTML report #4071

Closed
wants to merge 2 commits into from

Conversation

carsongee
Copy link

@carsongee carsongee commented Apr 14, 2023

Description

Adds secrets to the HTML report

Related issues

Before

image

After

image

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@CLAassistant
Copy link

CLAassistant commented Apr 14, 2023

CLA assistant check
All committers have signed the CLA.

@carsongee carsongee changed the title Added Secrets to the HTML report feat: Added Secrets to the HTML report Apr 14, 2023
@afdesk
Copy link
Contributor

afdesk commented Apr 24, 2023

LGTM.
but we need to update the integration tests.

@carsongee
Copy link
Author

I updated the integration test @afdesk. Let me know if you need anything else!

@afdesk
Copy link
Contributor

afdesk commented May 3, 2023

I updated the integration test @afdesk. Let me know if you need anything else!

@carsongee thanks!
is it possible to add a specific test for secret scan? I can help you with it

@carsongee
Copy link
Author

I'm happy to add tests. I'm fairly new to Go and very new to Trivy. Could you give me some pointers and suggestions @afdesk ?

@knqyf263 knqyf263 requested a review from afdesk May 8, 2023 08:50
@afdesk
Copy link
Contributor

afdesk commented May 10, 2023

@carsongee thanks for your efforts.

you can add a new test with secrets.html.golden files like json:

{
name: "scan sample.pem with fs command in client/server mode",
args: csArgs{
Command: "fs",
RemoteAddrOption: "--server",
secretConfig: "testdata/fixtures/fs/secrets/trivy-secret.yaml",
Target: "testdata/fixtures/fs/secrets/",
},
golden: "testdata/secrets.json.golden",
},

also you can update golden files to switch this flag:

var update = flag.Bool("update", false, "update golden files")

@github-actions
Copy link

This PR is stale because it has been labeled with inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and will be auto-closed. label Jul 10, 2023
@github-actions github-actions bot closed this Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and will be auto-closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exposed secrets are not reported when using the html template
3 participants