Code Monkey home page Code Monkey logo

Comments (9)

evgenyz avatar evgenyz commented on June 16, 2024 2

from osbuild.

evgenyz avatar evgenyz commented on June 16, 2024

Hey, @kingsleyzissou!

from osbuild.

kingsleyzissou avatar kingsleyzissou commented on June 16, 2024

cc @achilleas-k @thozza @supakeen

Is this something we can/should be doing? And if we do we could probably omit the bwrap part. Any suggestions here?

from osbuild.

supakeen avatar supakeen commented on June 16, 2024

I'd need a bit more background. It is something we can do and if this is in the oscap stage then I have no problems with adding this.

What is the OSCAP issue we're having that this solves?

As a sidenote, why is this a special way? This seems to me to be the normal way to give additional environment variables to child processes.

from osbuild.

kingsleyzissou avatar kingsleyzissou commented on June 16, 2024

As far as I recall, and maybe @evgenyz can elaborate, it's being used to identify when remediation is being done offline - so we might handle the remediations differently in offline mode.

A concrete example of this is checking partitions. Currently, the openscap utility tries to check /proc/mounts which isn't available during image builder. They'd be able to use the environment variable and handle the check differently, in theory.

Edit to add:
I'd probably choose a different variable name though

from osbuild.

supakeen avatar supakeen commented on June 16, 2024

Right, if the oscap team is going to switch behavior based on if they're running in $buildsystem then it's a good idea to give them that information; however it'd be nice if that's a bit more 'standard' (as far as a standard exists). How about we pass an environment variable OSCAP_BUILD_SYSTEM=osbuild? Or is container in the environment already implemented in oscap?

from osbuild.

kingsleyzissou avatar kingsleyzissou commented on June 16, 2024

Yeah sorry that's what I meant by changing the name of the env variable. I'm not entirely sure if it's implemented elsewhere. So we can wait for Evgeny to get back to us on that

from osbuild.

thozza avatar thozza commented on June 16, 2024

The container variable should be already set for the stage when it is run. It should not be need to set a special environment variable when we run subprocess.run() as it inherits it. Although if that is the only option for oscap, it can be set. If that's the case, then I would set it to the same value that is set in container environment variable.

see

"container": "bwrap-osbuild",

from osbuild.

thozza avatar thozza commented on June 16, 2024

In that case, please submit a PR with the diff mentioned in the description and from my PoV it should be acceptable to merge it.

from osbuild.

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.