-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(secret): Consider secrets in rpc calls #2753
Conversation
I tested this PR, but didn't see secrets in client/server mode. I didn't take a deeper look though. Could you add a test here so that we can confirm secret scanning works in client/server mode as well? You can put dummy secrets under trivy/integration/client_server_test.go Lines 232 to 240 in da6f1b6
|
added secrets field for ConvertToRPCBlobInfo to consider secrets while putting blob
integration/client_server_test.go
Outdated
RemoteAddrOption: "--server", | ||
Target: "testdata/fixtures/fs/secrets/", | ||
}, | ||
golden: "testdata/secrets-rpc.json.golden", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the same golden file? We need to make sure the results are the same between standalone mode and client/server mode. For example, we use the same golden files for image scanning.
trivy/integration/client_server_test.go
Lines 49 to 55 in 85ca86c
{ | |
name: "alpine 3.9", | |
args: csArgs{ | |
Input: "testdata/fixtures/images/alpine-39.tar.gz", | |
}, | |
golden: "testdata/alpine-39.json.golden", | |
}, |
] | ||
}, | ||
{ | ||
"Target": "sample.pem", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any specific reason to add this key? This test case already has GitHub PAT and AWS access keys. Aren't they enough?
Description
Currently secrets stored as part for blobInfo are dropped when putblob is done via remote cache.
The final server scan response as well drops Secrets if any.
This Pull Request, adds support to Secrets field for RPC calls
The change for pkg/rpc/client/client.go is needed as scanner/service.proto changes were not in sync.
Related issues
Related PRs
Remove this section if you don't have related PRs.
Checklist