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

fix(aws): handle ECR repositories in different regions #6217

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

knrc
Copy link
Contributor

@knrc knrc commented Feb 28, 2024

Description

This PR modified the ECR integration so that it obtains authorization tokens from the region hosting the ECR. Current behaviour would be to use the default, resulting in authentication errors such as

2024-02-26T18:56:03.738Z	ERROR	Error during vulnerabilities or misconfiguration scan: scan error: unable to initialize a scanner: unable to initialize an image scanner: 4 errors occurred:
	* docker error: unable to inspect the image (127647282379.dkr.ecr.us-east-1.amazonaws.com/undistro-test-image:1.25.3): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
	* containerd error: containerd socket not found: /run/containerd/containerd.sock
	* podman error: unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
	* remote error: GET https://127647282379.dkr.ecr.us-east-1.amazonaws.com/v2/undistro-test-image/manifests/1.25.3: unexpected status code 401 Unauthorized: Not Authorized

2024-02-26T18:56:03.738Z	ERROR	Error during vulnerabilities or misconfiguration scan: scan error: unable to initialize a scanner: unable to initialize an image scanner: 4 errors occurred:
	* docker error: unable to inspect the image (127647282379.dkr.ecr.sa-east-1.amazonaws.com/undistro-test-image:1.25.3): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
	* containerd error: containerd socket not found: /run/containerd/containerd.sock
	* podman error: unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
	* remote error: GET https://127647282379.dkr.ecr.sa-east-1.amazonaws.com/v2/undistro-test-image/manifests/1.25.3: unexpected status code 401 Unauthorized: Not Authorized

This was raised in #1026, which is now closed although the underlying issue doesn't appear to be addressed.

Related issues

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 Feb 28, 2024

CLA assistant check
All committers have signed the CLA.

@knrc knrc changed the title bug(aws): handle ECR repositories in different regions fix(aws): handle ECR repositories in different regions Feb 28, 2024
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

Hello @knrc
Thanks for your report!

Left comments. Take a look, when you have time, please.

Regards, Dmitriy

pkg/fanal/image/registry/ecr/ecr.go Outdated Show resolved Hide resolved
pkg/fanal/image/registry/ecr/ecr.go Outdated Show resolved Hide resolved
pkg/fanal/image/registry/ecr/ecr_test.go Outdated Show resolved Hide resolved
pkg/fanal/image/registry/ecr/ecr.go Outdated Show resolved Hide resolved
@knrc knrc force-pushed the ecr_multi_region branch 4 times, most recently from 1d8902b to ed18edb Compare February 29, 2024 13:48
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

@knrc Thanks for your work!

@@ -46,11 +46,34 @@ func (e *ECR) CheckOptions(domain string, option types.RegistryOptions) error {
return err
}

// override region with the value from the repository domain
cfg.Region = region
Copy link
Contributor

@DmitriyLewen DmitriyLewen Mar 1, 2024

Choose a reason for hiding this comment

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

@knrc I found 1 interesting case:
if AWS_REGION env != region from domain:
Should we use AWS_REGION (we are overwriting this value now)?

IIUC this case is user mistake (wrongAWS_REGION). But perhaps it make sense to show warning log message about this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DmitriyLewen The point of the PR is to override the AWS_REGION setting, if we don't do that then we end up with an authentication token for one region and have no visibility of containers hosted in other regions.

Our use case is multiple private repositories in multiple regions.

Copy link
Contributor

@DmitriyLewen DmitriyLewen Mar 1, 2024

Choose a reason for hiding this comment

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

I meant that we need to tell the user that region from AWS_REGION != region from domain.
Something like that:

func getSession(region string, option types.RegistryOptions) (aws.Config, error) {
	// create custom credential information if option is valid
	if option.AWSSecretKey != "" && option.AWSAccessKey != "" && option.AWSRegion != "" {
		if region != option.AWSRegion {
			log.Logger.Warnf("The region from AWS_REGION (%s) is incorrect. The region from domain (%s) was used.", option.AWSRegion, region)
		}
		return config.LoadDefaultConfig(
			context.TODO(),
			config.WithRegion(region),
			config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(option.AWSAccessKey, option.AWSSecretKey, option.AWSSessionToken)),
		)
	}
	return config.LoadDefaultConfig(context.TODO(), config.WithRegion(region))
}

Also i am worried about asff template. We use AWS_REGION env for this template. Perhaps we need to set AWS_REGION env when we have overwritten the region.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DmitriyLewen Ah gotcha. We can certainly add a message, although I'm not sure it would make much sense as it is likely to have been set by the webhook to match the EKS installation. If you consider our use case, with multiple private repositories in different regions, then it would be impossible for the user to set the region appropriately so it would be defaulted to the webhook's view.

I can take a look at the template today, I didn't consider that, and can certainly pass the parameter through to getSession as that seems cleaner than rewriting it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pushed the changes for getSession and the warning, looking at the template.

Copy link
Contributor

Choose a reason for hiding this comment

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

But it looks like when using asff template, users will have AWS_REGION set. In addition, we display a warning.
We can start with these changes.

If problems arise, we will think about fixing them (as another solution, we can add your regex to asff.tpl).

Copy link
Contributor Author

@knrc knrc Mar 5, 2024

Choose a reason for hiding this comment

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

should Region match the image region?

AWS docs(https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_AwsSecurityFinding.html#securityhub-Type-AwsSecurityFinding-ProductArn) say:

Region

    The Region from which the finding was generated.

+1, in my view Arn and Region are not related but the template assumes they are.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it looks like when using asff template, users will have AWS_REGION set. In addition, we display a warning. We can start with these changes.

If problems arise, we will think about fixing them (as another solution, we can add your regex to asff.tpl).

Yes, since the output doesn't change with this PR we are no worse off. I do think there is change needed for the template but that should be a separate issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DmitriyLewen I don't think those other links change anything for this PR.

@knrc knrc force-pushed the ecr_multi_region branch from ed18edb to a8f52b1 Compare March 1, 2024 14:32
Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

Thanks for your work @knrc

@knqyf263 i approved this PR.
If you agree with #6217 (comment) - we can merge it.

@knrc
Copy link
Contributor Author

knrc commented Mar 21, 2024

@DmitriyLewen I ran into another problem, it turns out the registry code (at least in 0.49.1) is broken. The three registries (google, azure and ECR) are invoked concurrently, which means their state gets overwritten each time while still being used.

I have some fixes for that, I'll check with 0.50.0 and push up another version of this PR some time next week.

@knrc knrc force-pushed the ecr_multi_region branch from a8f52b1 to cf22fc8 Compare March 26, 2024 14:27
@knrc
Copy link
Contributor Author

knrc commented Mar 26, 2024

@DmitriyLewen I pushed up the changes so you can see the difference, I'm just about to test them on 0.50.0. I'll rebase the PR on the latest once I've validated it.

@knrc knrc force-pushed the ecr_multi_region branch from cf22fc8 to 2c9ca4f Compare March 26, 2024 20:53
@knrc
Copy link
Contributor Author

knrc commented Mar 26, 2024

@DmitriyLewen I've tested and rebased the PR, it's ready again

@DmitriyLewen
Copy link
Contributor

Hello @knrc

The three registries (google, azure and ECR) are invoked concurrently, which means their state gets overwritten each time while still being used.

I'm a little confused

Trivy checks registries sequentially:

for _, registry := range registries {
err := registry.CheckOptions(domain, opt)
if err != nil {
continue
}
username, password, err := registry.GetCredential(ctx)
if err != nil {
// only skip check registry if error occurred
log.Logger.Debug(err)
break
}
return authn.Basic{
Username: username,
Password: password,
}
}
return authn.Basic{}

Which field is overwritten?

@knrc
Copy link
Contributor Author

knrc commented Mar 27, 2024

I'm a little confused

Trivy checks registries sequentially:

It does, within GetToken, however GetToken is called concurrently.

Which field is overwritten?

Line 37 calls CheckOptions, which will create client resources in the singleton registry based on the domain. This client is then used later within GetCredentials. Since the singletons are being accessed concurrently the client is not guaranteed to be the one created within the previous call to CheckOptions in the loop.

@DmitriyLewen
Copy link
Contributor

I think I understand your logic.

But I don't see any place where we use GetToken function (or upper function) using goroutines.
We also use 1 image. Therefore, if we overwrite ECRClient -> it will be a new ECRClient but with the same settings.

But i can missing something. Will be great if you can show some example.

Anyway, I think these changes should be made in another PR.
Can you undo the last changes and create a new PR with those changes and the example in the new PR?

@knrc
Copy link
Contributor Author

knrc commented Apr 3, 2024

But I don't see any place where we use GetToken function (or upper function) using goroutines. We also use 1 image. Therefore, if we overwrite ECRClient -> it will be a new ECRClient but with the same settings.

But i can missing something. Will be great if you can show some example.

The artifacts are scanned by different workers in parallel, see

p := parallel.NewPipeline(s.opts.Parallel, !s.opts.Quiet, resourceArtifacts, onItem, onResult)
err = p.Do(ctx)

Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

@knrc sorry for the wait for an answer.

The artifacts are scanned by different workers in parallel, see

Thank you for showing me this. I'm currently seeing this problem!

Your changes look correct for this case.

I left 1 comment about google test.

@knrc
Copy link
Contributor Author

knrc commented Apr 18, 2024

@knrc sorry for the wait for an answer.

No worries, we all have our day jobs.

The artifacts are scanned by different workers in parallel, see

Thank you for showing me this. I'm currently seeing this problem!

:)

Your changes look correct for this case.

I left 1 comment about google test.

Sounds good, I'll take a look. I'm at Open Source Summit this week, but will try to get to this as quickly as I can.

@knrc knrc force-pushed the ecr_multi_region branch 2 times, most recently from d0f4e93 to ed0beb2 Compare April 18, 2024 13:33
@knrc
Copy link
Contributor Author

knrc commented Apr 18, 2024

Sounds good, I'll take a look. I'm at Open Source Summit this week, but will try to get to this as quickly as I can.

@DmitriyLewen I rebased and updated the PR for your comment, can you take another look?

@DmitriyLewen
Copy link
Contributor

@knrc can you fix linter error?

@knrc
Copy link
Contributor Author

knrc commented Apr 19, 2024

@knrc can you fix linter error?

Yes, I can add that to the list since I'm in those files anyway.

@knrc knrc force-pushed the ecr_multi_region branch from ed0beb2 to dff6701 Compare April 19, 2024 17:50
@knrc
Copy link
Contributor Author

knrc commented Apr 19, 2024

@DmitriyLewen try now

Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

@knrc Thanks for your work!

@knqyf263 take a look, when you have time, please.

@knqyf263
Copy link
Collaborator

Thanks for the contribution. This PR needs to resolve conflicts now.

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 Aug 21, 2024
@knrc
Copy link
Contributor Author

knrc commented Aug 21, 2024

I'll take a look at this over the next few days

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and will be auto-closed. label Aug 22, 2024
@knrc knrc force-pushed the ecr_multi_region branch from dff6701 to 9461d74 Compare August 29, 2024 17:05
@knqyf263 knqyf263 enabled auto-merge August 30, 2024 07:29
@knqyf263 knqyf263 added this pull request to the merge queue Aug 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 30, 2024
@knrc
Copy link
Contributor Author

knrc commented Aug 30, 2024

The integration tests appear to be hitting a limit

    library_test.go:165: 
        	Error Trace:	/home/runner/work/trivy/trivy/pkg/fanal/test/integration/library_test.go:165
        	Error:      	Received unexpected error:
        	            	unable to find the specified image "ghcr.io/aquasecurity/trivy-test-images:opensuse-tumbleweed" in ["remote"]:
        	            	    github.com/aquasecurity/trivy/pkg/fanal/image.NewContainerImage
        	            	        /home/runner/work/trivy/trivy/pkg/fanal/image/image.go:58
        	            	  - 1 error occurred:
        	            		* remote error: GET https://ghcr.io/v2/aquasecurity/trivy-test-images/manifests/opensuse-tumbleweed: TOOMANYREQUESTS: retry-after: 750.362µs, allowed: 44000/minute

@knrc
Copy link
Contributor Author

knrc commented Aug 30, 2024

The test does run successfully when executed locally

@DmitriyLewen DmitriyLewen added this pull request to the merge queue Sep 2, 2024
Merged via the queue into aquasecurity:main with commit feaef96 Sep 2, 2024
12 checks passed
@aqua-bot aqua-bot mentioned this pull request Sep 2, 2024
@DmitriyLewen
Copy link
Contributor

Hello @knrc
Looks like it was bug in CI/CD.

PR has been merged.

fhielpos added a commit to giantswarm/trivy-upstream that referenced this pull request Dec 20, 2024
* feat(vm): Support direct filesystem (aquasecurity#7058)

Signed-off-by: yusuke.koyoshi <[email protected]>

* feat(cli)!: delete deprecated SBOM flags (aquasecurity#7266)

Signed-off-by: knqyf263 <[email protected]>

* feat(vm): support the Ext2/Ext3 filesystems (aquasecurity#6983)

* fix(plugin): do not call GitHub content API for releases and tags (aquasecurity#7274)

Signed-off-by: knqyf263 <[email protected]>

* fix(java): Return error when trying to find a remote pom to avoid segfault (aquasecurity#7275)

Co-authored-by: DmitriyLewen <[email protected]>

* fix(flag): incorrect behavior for deprected flag `--clear-cache` (aquasecurity#7281)

* refactor(misconf): remove file filtering from parsers (aquasecurity#7289)

Signed-off-by: nikpivkin <[email protected]>

* feat(vuln): Add `--detection-priority` flag for accuracy tuning (aquasecurity#7288)

Signed-off-by: knqyf263 <[email protected]>

* docs: add auto-generated config (aquasecurity#7261)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* fix(terraform): add aws_region name to presets (aquasecurity#7184)

* perf(misconf): do not convert contents of a YAML file to string (aquasecurity#7292)

Signed-off-by: nikpivkin <[email protected]>

* refactor(misconf): remove unused universal scanner (aquasecurity#7293)

Signed-off-by: nikpivkin <[email protected]>

* perf(misconf): use json.Valid to check validity of JSON (aquasecurity#7308)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): load only submodule if it is specified in source (aquasecurity#7112)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): support for policy and bucket grants (aquasecurity#7284)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): do not set default value for default_cache_behavior (aquasecurity#7234)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): iterator argument support for dynamic blocks (aquasecurity#7236)

Signed-off-by: nikpivkin <[email protected]>
Co-authored-by: simar7 <[email protected]>

* chore(deps): bump the common group across 1 directory with 7 updates (aquasecurity#7305)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: update client/server docs for misconf and license scanning (aquasecurity#7277)

Signed-off-by: nikpivkin <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* docs: update links to packaging.python.org (aquasecurity#7318)

Signed-off-by: nikpivkin <[email protected]>

* perf(misconf): optimize work with context (aquasecurity#6968)

Signed-off-by: nikpivkin <[email protected]>

* refactor: replace ftypes.Gradle with packageurl.TypeGradle (aquasecurity#7323)

Signed-off-by: nikpivkin <[email protected]>

* docs: update air-gapped docs (aquasecurity#7160)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* docs(misconf): Update callsites to use correct naming (aquasecurity#7335)

* chore(deps): bump the common group with 9 updates (aquasecurity#7333)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(misconf): change default TLS values for the Azure storage account (aquasecurity#7345)

Signed-off-by: nikpivkin <[email protected]>

* refactor(misconf): highlight only affected rows (aquasecurity#7310)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): wrap Azure PortRange in iac types (aquasecurity#7357)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): scanning support for YAML and JSON (aquasecurity#7311)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): variable support for Terraform Plan (aquasecurity#7228)

Signed-off-by: nikpivkin <[email protected]>

* fix: safely check if the directory exists (aquasecurity#7353)

Signed-off-by: nikpivkin <[email protected]>

* chore(deps): bump the aws group across 1 directory with 7 updates (aquasecurity#7358)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(server): add internal `--path-prefix` flag for client/server mode (aquasecurity#7321)

Signed-off-by: knqyf263 <[email protected]>

* chore(deps): bump trivy-checks (aquasecurity#7350)

Signed-off-by: nikpivkin <[email protected]>

* refactor(misconf): use slog (aquasecurity#7295)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): ignore duplicate checks (aquasecurity#7317)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): init frameworks before updating them (aquasecurity#7376)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): support deprecating for Go checks (aquasecurity#7377)

Signed-off-by: nikpivkin <[email protected]>

* feat(python): use minimum version for pip packages (aquasecurity#7348)

* docs: add pkg flags to config file page (aquasecurity#7370)

* feat(misconf): Add support for using spec from on-disk bundle (aquasecurity#7179)

* fix(report): escape `Message` field in `asff.tpl` template (aquasecurity#7401)

* fix(misconf): use module to log when metadata retrieval fails (aquasecurity#7405)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): support for ignore by nested attributes (aquasecurity#7205)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): do not filter Terraform plan JSON by name (aquasecurity#7406)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): port and protocol support for EC2 networks (aquasecurity#7146)

Signed-off-by: nikpivkin <[email protected]>

* chore: fix allow rule of ignoring test files to make it case insensitive (aquasecurity#7415)

* fix(secret): use only line with secret for long secret lines (aquasecurity#7412)

* chore: update CODEOWNERS (aquasecurity#7398)

Signed-off-by: knqyf263 <[email protected]>

* feat(server): Make Trivy Server Multiplexer Exported (aquasecurity#7389)

* feat(report): export modified findings in JSON (aquasecurity#7383)

Signed-off-by: knqyf263 <[email protected]>

* fix(sbom): use `NOASSERTION` for licenses fields in SPDX formats (aquasecurity#7403)

* fix(misconf): do not register Rego libs in checks registry (aquasecurity#7420)

Signed-off-by: nikpivkin <[email protected]>

* chore(deps): Bump trivy-checks (aquasecurity#7417)

Signed-off-by: nikpivkin <[email protected]>
Co-authored-by: nikpivkin <[email protected]>

* fix(misconf): do not recreate filesystem map (aquasecurity#7416)

Signed-off-by: nikpivkin <[email protected]>

* fix(secret): use `.eyJ` keyword for JWT secret (aquasecurity#7410)

* fix(misconf): fix infer type for null value (aquasecurity#7424)

Signed-off-by: nikpivkin <[email protected]>

* fix(aws): handle ECR repositories in different regions (aquasecurity#6217)

Signed-off-by: Kevin Conner <[email protected]>

* fix: logger initialization before flags parsing (aquasecurity#7372)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* fix(nodejs): check all `importers` to detect dev deps from pnpm-lock.yaml file (aquasecurity#7387)

* test: add integration plugin tests (aquasecurity#7299)

* feat(sbom): set User-Agent header on requests to Rekor (aquasecurity#7396)

Signed-off-by: Bob Callaway <[email protected]>

* fix(helm): explicitly define `kind` and `apiVersion` of `volumeClaimTemplate` element (aquasecurity#7362)

* chore(deps): Bump trivy-checks and pin OPA (aquasecurity#7427)

Signed-off-by: nikpivkin <[email protected]>
Co-authored-by: nikpivkin <[email protected]>

* feat(java): add `test` scope support for `pom.xml` files (aquasecurity#7414)

* fix(license): add license handling to JUnit template (aquasecurity#7409)

* feat(go): use `toolchain` as `stdlib` version for `go.mod` files (aquasecurity#7163)

* release: v0.55.0 [main] (aquasecurity#7271)

* fix(license): stop spliting a long license text (aquasecurity#7336)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* refactor(java): add error/statusCode for logs when we can't get pom.xml/maven-metadata.xml from remote repo (aquasecurity#7451)

* chore(helm): bump up Trivy Helm chart (aquasecurity#7441)

* chore(deps): bump the common group across 1 directory with 19 updates (aquasecurity#7436)

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: knqyf263 <[email protected]>

* chore(deps): bump the aws group with 6 updates (aquasecurity#7468)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(oracle): Update EOL date for Oracle 7 (aquasecurity#7480)

* fix(report): change a receiver of MarshalJSON (aquasecurity#7483)

Signed-off-by: knqyf263 <[email protected]>

* fix(report): fix error with unmarshal of `ExperimentalModifiedFindings` (aquasecurity#7463)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* docs(oci): Add a note About the expected Media Type for the Trivy-DB OCI Artifact (aquasecurity#7449)

* feat(license): improve license normalization (aquasecurity#7131)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: DmitriyLewen <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* docs(db): add a manifest example (aquasecurity#7485)

Signed-off-by: knqyf263 <[email protected]>

* revert(java): stop supporting of `test` scope for `pom.xml` files (aquasecurity#7488)

* docs: refine go docs (aquasecurity#7442)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* chore(vex): suppress openssl vulnerabilities (aquasecurity#7500)

Signed-off-by: knqyf263 <[email protected]>

* chore(deps): bump alpine from 3.20.0 to 3.20.3 (aquasecurity#7508)

* chore(vex): add `CVE-2024-34155`, `CVE-2024-34156` and `CVE-2024-34158` in `trivy.openvex.json` (aquasecurity#7510)

* fix(java): use `dependencyManagement` from root/child pom's for dependencies from parents (aquasecurity#7497)

* refactor: split `.egg` and `packaging` analyzers (aquasecurity#7514)

* feat(misconf): Register checks only when needed (aquasecurity#7435)

* fix(misconf): Fix logging typo (aquasecurity#7473)

* chore(deps): bump go-ebs-file (aquasecurity#7513)

Signed-off-by: nikpivkin <[email protected]>

* fix(sbom): parse type `framework` as `library` when unmarshalling `CycloneDX` files (aquasecurity#7527)

* refactor(misconf): pass options to Rego scanner as is (aquasecurity#7529)

Signed-off-by: nikpivkin <[email protected]>

* fix(sbom): export bom-ref when converting a package to a component (aquasecurity#7340)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: amf <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* perf(misconf): use port ranges instead of enumeration (aquasecurity#7549)

Signed-off-by: nikpivkin <[email protected]>

* fix(misconf): Fixed scope for China Cloud (aquasecurity#7560)

* docs(misconf): Add more info on how to use arbitrary JSON/YAML scan feat (aquasecurity#7458)

* chore(deps): remove broken replaces for opa and discovery (aquasecurity#7600)

* ci: cache test images for `integration`, `VM` and `module` tests (aquasecurity#7599)

* ci: add `workflow_dispatch` trigger for test workflow. (aquasecurity#7606)

* chore(deps): bump the common group across 1 directory with 20 updates (aquasecurity#7604)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: knqyf263 <[email protected]>

* fix(db): check `DownloadedAt` for `trivy-java-db` (aquasecurity#7592)

* fix: allow access to '..' in mapfs (aquasecurity#7575)

Signed-off-by: nikpivkin <[email protected]>

* test: use a local registry for remote scanning (aquasecurity#7607)

Signed-off-by: knqyf263 <[email protected]>

* fix(misconf): escape all special sequences (aquasecurity#7558)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): add ability to disable checks by ID (aquasecurity#7536)

Signed-off-by: nikpivkin <[email protected]>
Co-authored-by: Simar <[email protected]>

* feat(suse): added SUSE Linux Enterprise Micro support (aquasecurity#7294)

Signed-off-by: Marcus Meissner <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* fix(misconf): disable DS016 check for image history analyzer (aquasecurity#7540)

Signed-off-by: nikpivkin <[email protected]>

* ci: split `save` and `restore` cache actions (aquasecurity#7614)

* refactor: fix auth error handling (aquasecurity#7615)

Signed-off-by: knqyf263 <[email protected]>

* feat(secret): enhance secret scanning for python binary files (aquasecurity#7223)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: knqyf263 <[email protected]>

* feat(java): add empty versions if `pom.xml` dependency versions can't be detected (aquasecurity#7520)

Co-authored-by: Teppei Fukuda <[email protected]>

* test: use loaded image names (aquasecurity#7617)

Signed-off-by: knqyf263 <[email protected]>

* ci: don't use cache for `setup-go` (aquasecurity#7622)

* feat: support multiple DB repositories for vulnerability and Java DB (aquasecurity#7605)

Signed-off-by: nikpivkin <[email protected]>

* feat(misconf): Support `--skip-*` for all included modules  (aquasecurity#7579)

Signed-off-by: nikpivkin <[email protected]>
Co-authored-by: nikpivkin <[email protected]>

* chore: add prefixes to log messages (aquasecurity#7625)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: simar7 <[email protected]>

* fix(misconf): Disable deprecated checks by default (aquasecurity#7632)

* chore(deps): Bump trivy-checks to v1.1.0 (aquasecurity#7631)

* fix(secret): change grafana token regex to find them without unquoted (aquasecurity#7627)

* feat: support RPM archives (aquasecurity#7628)

Signed-off-by: knqyf263 <[email protected]>

* fix(misconf): not to warn about missing selectors of libraries (aquasecurity#7638)

Signed-off-by: nikpivkin <[email protected]>

* release: v0.56.0 [main] (aquasecurity#7447)

* fix(db): fix javadb downloading error handling [backport: release/v0.56] (aquasecurity#7646)

Signed-off-by: nikpivkin <[email protected]>
Co-authored-by: Nikita Pivkin <[email protected]>

* release: v0.56.1 [release/v0.56] (aquasecurity#7648)

* fix(sbom): add options for DBs in private registries [backport: release/v0.56] (aquasecurity#7691)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: Teppei Fukuda <[email protected]>

* fix(redhat): include arch in PURL qualifiers [backport: release/v0.56] (aquasecurity#7702)

Signed-off-by: knqyf263 <[email protected]>
Co-authored-by: Teppei Fukuda <[email protected]>

* release: v0.56.2 [release/v0.56] (aquasecurity#7694)

* Make liveness probe configurable (#3)

---------

Signed-off-by: yusuke.koyoshi <[email protected]>
Signed-off-by: knqyf263 <[email protected]>
Signed-off-by: nikpivkin <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Kevin Conner <[email protected]>
Signed-off-by: Bob Callaway <[email protected]>
Signed-off-by: Marcus Meissner <[email protected]>
Co-authored-by: yusuke-koyoshi <[email protected]>
Co-authored-by: Teppei Fukuda <[email protected]>
Co-authored-by: Aruneko <[email protected]>
Co-authored-by: Colm O hEigeartaigh <[email protected]>
Co-authored-by: DmitriyLewen <[email protected]>
Co-authored-by: afdesk <[email protected]>
Co-authored-by: Nikita Pivkin <[email protected]>
Co-authored-by: Alberto Donato <[email protected]>
Co-authored-by: simar7 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Itay Shakury <[email protected]>
Co-authored-by: DmitriyLewen <[email protected]>
Co-authored-by: aasish-r <[email protected]>
Co-authored-by: Ori <[email protected]>
Co-authored-by: Kevin Conner <[email protected]>
Co-authored-by: Bob Callaway <[email protected]>
Co-authored-by: vhash <[email protected]>
Co-authored-by: psibre <[email protected]>
Co-authored-by: Aqua Security automated builds <[email protected]>
Co-authored-by: s-reddy1498 <[email protected]>
Co-authored-by: Squiddim <[email protected]>
Co-authored-by: Pierre Baumard <[email protected]>
Co-authored-by: Lior Kaplan <[email protected]>
Co-authored-by: amf <[email protected]>
Co-authored-by: bloomadcariad <[email protected]>
Co-authored-by: Sylvain Baubeau <[email protected]>
Co-authored-by: Simar <[email protected]>
Co-authored-by: Marcus Meissner <[email protected]>
Co-authored-by: Samuel Gaist <[email protected]>
fhielpos pushed a commit to giantswarm/trivy-upstream that referenced this pull request Dec 20, 2024
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.

AWS ECR registry authentication only works in the same/default region as caller
4 participants