Skip to content

Passing parameters to ScheduledScan #2315

Description

@danil-smirnov

➹ New Feature implementation request

Is your feature request related to a problem?

When we invoke a scan, e.g. Trivy image scan, we pass an image:tag to the scanner as a parameter:
https://www.securecodebox.io/docs/scanners/trivy/#image-juice-shop

We can define an image and a tag when we create a Scan CRD.

However, if we want to scan periodically using the ScheduledScan, we have to hardcode an image:tag in the ScanSpec field, which forces the scan to run against the same image all the time.

Describe the solution you'd like

It would be great if we could set a custom logic, that calculates an image:tag at the time of scanning and passes the result to the scanner via a parameter.

We can define such logic via the InitContainers parameter, but the only way to pass the result to the scunner is via a mounted volume, which doesn't help e.g. in the case of the Trivy image scan.

It would be great if we could consume InitContainers run results as part of the parameters passed to the scanner.

Describe alternatives you've considered

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions