Code Monkey home page Code Monkey logo

Comments (1)

J12934 avatar J12934 commented on June 13, 2024

Cool idea but not sure if we can or if we should support it.

couples of thoughts:

  1. Using initContainers to generate the parameters would be hard to impossible. The scans parameters are passed to the scan as args to the scanner container. I'm pretty sure this field is immutable on a pod or at least changing it after the pod is scheduled to a node doesn't have an effect.
    I think what is possible is to change the value in a configmap / secret the pod is mounting e.g. to inject a environments variable. The scan container could then use the value in the environment variable to generate the parameters but this wouldn't work when the scan container doesn't have a shell init. e.g. because it's build using a distroless image
  2. Determining the parameters at runtime would make it really hard to debug why a scan is failing. especially if the value would also only be around at runtime.

for now if you need to change the parameters of a scheduledScan I'd suggest to do it simmilarly to the auto-discovery which changes the parameters of the scheduledscan and then triggers a premature execution of it by resetting the last executed at timestamp of the scheduledScan, which triggers a new execution right away. https://github.com/secureCodeBox/secureCodeBox/blob/main/operator/utils/retrigger_scheduled_scan.go#L17

It's not the nicest thing but works really well.

if somebody is willing to sketch out a design of a "dynamic parameter generator" for schedueld scans I'd be very interessted in looking at this :D (espeically if the the people would also be willing to implement and maintain it :) )

from securecodebox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.