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

refactor(misconf): use slog #7295

Merged
merged 12 commits into from
Aug 23, 2024
Merged

refactor(misconf): use slog #7295

merged 12 commits into from
Aug 23, 2024

Conversation

nikpivkin
Copy link
Contributor

@nikpivkin nikpivkin commented Aug 1, 2024

Description

This PR improves the logging in the IaC package. The slog package is now used for logging, which aligns the logging style with Trivy.

Changes:

  • Use the slog package instead of debug
  • Added messages when parameter values are missing in CloudFormation and Terraform variables when they are not set by default and passed through arguments
  • Reduced logging noise when scanning Terraform

Small refactoring: since no options are now passed to IaC parsers, unnecessary interfaces have been removed.

Related issues

Before

2024-08-13T18:46:33+06:00	DEBUG	Initializing scan cache...	type="memory"
2024-08-13T18:46:33+06:00	DEBUG	Scanning files for misconfigurations...	scanner="Helm"
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.295939000 helm.scanner.rego                Overriding filesystem for checks!
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.297375000 helm.scanner.rego                Loaded 3 embedded libraries.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.334477000 helm.scanner.rego                Loaded 192 embedded policies.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.376318000 helm.scanner.rego                Loaded 195 checks from disk.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.376573000 helm.scanner.rego                Overriding filesystem for data!
2024-08-13T18:46:33+06:00	DEBUG	Scanning files for misconfigurations...	scanner="CloudFormation"
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.580120000 cloudformation.scanner.rego      Overriding filesystem for checks!
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.580801000 cloudformation.scanner.rego      Loaded 3 embedded libraries.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.613006000 cloudformation.scanner.rego      Loaded 192 embedded policies.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.650282000 cloudformation.scanner.rego      Loaded 195 checks from disk.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.650551000 cloudformation.scanner.rego      Overriding filesystem for data!
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863397000 cloudformation.scanner           Found 1 results for AVD-AWS-0086
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863424000 cloudformation.scanner           Found 1 results for AVD-AWS-0087
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863430000 cloudformation.scanner           Found 1 results for AVD-AWS-0088
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863433000 cloudformation.scanner           Found 1 results for AVD-AWS-0090
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863437000 cloudformation.scanner           Found 1 results for AVD-AWS-0132
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863442000 cloudformation.scanner           Found 1 results for AVD-AWS-0091
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863460000 cloudformation.scanner           Found 1 results for AVD-AWS-0092
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863464000 cloudformation.scanner           Found 1 results for AVD-AWS-0093
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863519000 cloudformation.scanner           Found 1 results for AVD-AWS-0094
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.863698000 cloudformation.scanner.rego      Scanning 1 inputs...
2024-08-13T18:46:33+06:00	DEBUG	Scanning files for misconfigurations...	scanner="Terraform"
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.869866000 terraform.scanner                Scanning [&{%!s(*mapfs.file=&{ [] {. 256 2147484096 {13954107996550735840 2495660001 0x109cfd2a0} <nil>} {{{0 0} {[] {} 0x14005a44aa0} map[] 0}}}) .}] at '.'...
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.872081000 terraform.scanner.rego           Overriding filesystem for checks!
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.872710000 terraform.scanner.rego           Loaded 3 embedded libraries.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.906372000 terraform.scanner.rego           Loaded 192 embedded policies.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.937903000 terraform.scanner.rego           Loaded 195 checks from disk.
2024-08-13T18:46:33+06:00	DEBUG	[misconf] 46:33.938182000 terraform.scanner.rego           Overriding filesystem for data!
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.147922000 terraform.parser.<root>          Setting project/module root to 'tf'
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.147945000 terraform.parser.<root>          Parsing FS from 'tf'
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.147964000 terraform.parser.<root>          Parsing 'tf/main.tf'...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148512000 terraform.parser.<root>          Added file tf/main.tf.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148586000 terraform.scanner                Scanning root module 'tf'...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148591000 terraform.parser.<root>          Setting project/module root to 'tf'
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148594000 terraform.parser.<root>          Parsing FS from 'tf'
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148601000 terraform.parser.<root>          Parsing 'tf/main.tf'...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148630000 terraform.parser.<root>          Added file tf/main.tf.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148634000 terraform.parser.<root>          Evaluating module...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148649000 terraform.parser.<root>          Read 1 block(s) and 0 ignore(s) for module 'root' (1 file[s])...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148657000 terraform.parser.<root>          Added 0 variables from tfvars.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148669000 terraform.parser.<root>          Working directory for module evaluation is "/Users/nikita/projects/trivy-test/iac-test"
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148882000 terraform.parser.<root>.evaluator Filesystem key is 'fa37a03cfd8ac454b5e2679e7861189a66b5bd655e64b6f2c3a2a19d93c9482c'
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.148887000 terraform.parser.<root>.evaluator Starting module evaluation...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149641000 terraform.parser.<root>.evaluator Starting submodule evaluation...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149645000 terraform.parser.<root>.evaluator All submodules are evaluated at i=0
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149650000 terraform.parser.<root>.evaluator Starting post-submodule evaluation...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149711000 terraform.parser.<root>.evaluator Finished processing 0 submodule(s).
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149714000 terraform.parser.<root>.evaluator Module evaluation complete.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149717000 terraform.parser.<root>          Finished parsing module 'root'.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.149720000 terraform.executor               Adapting modules...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.151064000 terraform.executor               Adapted 1 module(s) into defsec state data.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.151068000 terraform.executor               Using max routines of 7
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.151144000 terraform.executor               Initialized 487 rule(s).
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.151147000 terraform.executor               Created pool with 7 worker(s) to apply rules.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.151580000 terraform.scanner.rego           Scanning 1 inputs...
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.153173000 terraform.executor               Finished applying rules.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.153188000 terraform.executor               Applying ignores...
2024-08-13T18:46:34+06:00	DEBUG	Scanning files for misconfigurations...	scanner="Dockerfile"
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.157011000 dockerfile.scanner.rego          Overriding filesystem for checks!
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.157643000 dockerfile.scanner.rego          Loaded 3 embedded libraries.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.193945000 dockerfile.scanner.rego          Loaded 192 embedded policies.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.226278000 dockerfile.scanner.rego          Loaded 195 checks from disk.
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.226545000 dockerfile.scanner.rego          Overriding filesystem for data!
2024-08-13T18:46:34+06:00	DEBUG	[misconf] 46:34.441370000 dockerfile.scanner.rego          Scanning 1 inputs...
2024-08-13T18:46:34+06:00	DEBUG	OS is not detected.
2024-08-13T18:46:34+06:00	INFO	Detected config files	num=4
2024-08-13T18:46:34+06:00	DEBUG	Scanned config file	file_path="cf/main.yaml"
2024-08-13T18:46:34+06:00	DEBUG	Scanned config file	file_path="dockerfiles/Dockerfile.dev"
2024-08-13T18:46:34+06:00	DEBUG	Scanned config file	file_path="tf"
2024-08-13T18:46:34+06:00	DEBUG	Scanned config file	file_path="tf/main.tf"
2024-08-13T18:46:34+06:00	DEBUG	[vex] VEX filtering is disabled

After

2024-08-13T18:46:53+06:00       DEBUG   Initializing scan cache...      type="memory"
2024-08-13T18:46:53+06:00       DEBUG   Scanning files for misconfigurations... scanner="Helm"
2024-08-13T18:46:53+06:00       DEBUG   [rego] Overriding filesystem for checks
2024-08-13T18:46:53+06:00       DEBUG   [rego] Embedded libraries are loaded    count=3
2024-08-13T18:46:53+06:00       DEBUG   [rego] Embedded checks are loaded       count=192
2024-08-13T18:46:53+06:00       DEBUG   [rego] Checks from disk are loaded      count=195
2024-08-13T18:46:53+06:00       DEBUG   [rego] Overriding filesystem for data
2024-08-13T18:46:53+06:00       DEBUG   Scanning files for misconfigurations... scanner="Terraform"
2024-08-13T18:46:53+06:00       DEBUG   [terraform scanner] Scanning directory  file_path="."
2024-08-13T18:46:53+06:00       DEBUG   [rego] Overriding filesystem for checks
2024-08-13T18:46:53+06:00       DEBUG   [rego] Embedded libraries are loaded    count=3
2024-08-13T18:46:53+06:00       DEBUG   [rego] Embedded checks are loaded       count=192
2024-08-13T18:46:53+06:00       DEBUG   [rego] Checks from disk are loaded      count=195
2024-08-13T18:46:53+06:00       DEBUG   [rego] Overriding filesystem for data
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Setting project/module root  module="root" file_path="tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Parsing FS   module="root" file_path="tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Parsing      module="root" file_path="tf/main.tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Added file   module="root" file_path="tf/main.tf"
2024-08-13T18:46:54+06:00       INFO    [terraform scanner] Scanning root module        file_path="tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Setting project/module root  module="root" file_path="tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Parsing FS   module="root" file_path="tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Parsing      module="root" file_path="tf/main.tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Added file   module="root" file_path="tf/main.tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Loading module       module="root" module="root"
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Read block(s) and ignore(s)  module="root" blocks=1 ignores=0
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Added input variables from tfvars    module="root" count=0
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Working directory for module evaluation      module="root" file_path="/Users/nikita/projects/trivy"
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Starting module evaluation...     path="tf"
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Context unchanged iteration=1
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Starting post-submodules evaluation...
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=0
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Starting iteration        iteration=1
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Context unchanged iteration=1
2024-08-13T18:46:54+06:00       DEBUG   [terraform evaluator] Module evaluation complete.
2024-08-13T18:46:54+06:00       DEBUG   [terraform parser] Finished parsing module      module="root" module="root"
2024-08-13T18:46:54+06:00       DEBUG   [terraform executor] Adapting modules...
2024-08-13T18:46:54+06:00       DEBUG   [terraform executor] Adapted module(s) into state data. count=1
2024-08-13T18:46:54+06:00       DEBUG   [terraform executor] Using max routines count=7
2024-08-13T18:46:54+06:00       DEBUG   [terraform executor] Initialized rule(s).       count=487
2024-08-13T18:46:54+06:00       DEBUG   [rego] Scannning inputs count=1
2024-08-13T18:46:54+06:00       DEBUG   [terraform executor] Finished applying rules.
2024-08-13T18:46:54+06:00       DEBUG   [terraform executor] Applying ignores...
2024-08-13T18:46:54+06:00       DEBUG   Scanning files for misconfigurations... scanner="CloudFormation"
2024-08-13T18:46:54+06:00       DEBUG   [cloudformation parser] Context loaded from source      file_path="cf/main.yaml"
2024-08-13T18:46:54+06:00       DEBUG   [rego] Overriding filesystem for checks
2024-08-13T18:46:54+06:00       DEBUG   [rego] Embedded libraries are loaded    count=3
2024-08-13T18:46:54+06:00       DEBUG   [rego] Embedded checks are loaded       count=192
2024-08-13T18:46:54+06:00       DEBUG   [rego] Checks from disk are loaded      count=195
2024-08-13T18:46:54+06:00       DEBUG   [rego] Overriding filesystem for data
2024-08-13T18:46:54+06:00       DEBUG   [rego] Scannning inputs count=1
2024-08-13T18:46:54+06:00       DEBUG   Scanning files for misconfigurations... scanner="Dockerfile"
2024-08-13T18:46:54+06:00       DEBUG   [rego] Overriding filesystem for checks
2024-08-13T18:46:54+06:00       DEBUG   [rego] Embedded libraries are loaded    count=3
2024-08-13T18:46:54+06:00       DEBUG   [rego] Embedded checks are loaded       count=192
2024-08-13T18:46:54+06:00       DEBUG   [rego] Checks from disk are loaded      count=195
2024-08-13T18:46:54+06:00       DEBUG   [rego] Overriding filesystem for data
2024-08-13T18:46:54+06:00       DEBUG   [rego] Scannning inputs count=1
2024-08-13T18:46:54+06:00       DEBUG   OS is not detected.
2024-08-13T18:46:54+06:00       INFO    Detected config files   num=4
2024-08-13T18:46:54+06:00       DEBUG   Scanned config file     file_path="cf/main.yaml"
2024-08-13T18:46:54+06:00       DEBUG   Scanned config file     file_path="dockerfiles/Dockerfile.dev"
2024-08-13T18:46:54+06:00       DEBUG   Scanned config file     file_path="tf"
2024-08-13T18:46:54+06:00       DEBUG   Scanned config file     file_path="tf/main.tf"
2024-08-13T18:46:54+06:00       DEBUG   [vex] VEX filtering is disabled

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).

@nikpivkin nikpivkin marked this pull request as ready for review August 14, 2024 11:23
Comment on lines 199 to 210
p.logger.Debug("Added input variables from tfvars", log.Int("count", len(inputVars)))

for _, varBlock := range blocks.OfType("variable") {
if varBlock.GetAttribute("default") == nil {
if _, ok := inputVars[varBlock.TypeLabel()]; !ok {
p.logger.Warn(
"Variable was not found in the environment or variable files. Evaluating may not work correctly.",
log.String("variable", varBlock.TypeLabel()),
)
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Is there a test for 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.

Done 1cb0263
Also changed the wording of the logs to mean missing values rather than missing variables/parameters.

Comment on lines 62 to 63
opt.Debug("Found a token for the registry at %s", hostname)
opt.DebugLogger.Debug("Found a token for the registry", log.String("hostname", hostname))
Copy link
Member

Choose a reason for hiding this comment

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

It seems a little too verbose to have opt.DebugLogger.Debug. Could we rename it better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed DebugLogger to Logger b2cdb99

@simar7 simar7 self-requested a review August 22, 2024 00:02
Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

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

lgtm!

@simar7
Copy link
Member

simar7 commented Aug 22, 2024

@nikpivkin looks like we have some merge conflicts to resolve prior to merging.

@nikpivkin
Copy link
Contributor Author

@simar7 Done

@simar7 simar7 added this pull request to the merge queue Aug 23, 2024
Merged via the queue into aquasecurity:main with commit bfdf5cf Aug 23, 2024
12 checks passed
`Invalid "for-each" argument: map key (or set value) is not a string, but %s`,
key.Type().FriendlyName(),
e.logger.Error(
`Failed to expand block. Invalid "for-each" argument: map key (or set value) is not a string`,
Copy link

@VuKrampHub VuKrampHub Nov 19, 2024

Choose a reason for hiding this comment

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

@nikpivkin Hey there. It seems after this change, a couple of previously debug logs now showing as error logs. do you have any suggestion to keep the logs output roughly as they were so it doesn't confuse my IaC modules' users than needed? Thanks a lot!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@simar7 Maybe we should lower the message level to debug?

Copy link
Member

Choose a reason for hiding this comment

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

@nikpivkin I agree, could you open a PR to address that?

Choose a reason for hiding this comment

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

Thank you both for the quick response and action!

@nikpivkin nikpivkin deleted the iac-slog branch November 19, 2024 13:52
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.

bug(misconf): Inconsistent in the issue count If terraform variables are not passed
3 participants