Skip to content

Ship oscap-run-sce-script with the SCE engine - #2451

Open
mufeso wants to merge 1 commit into
OpenSCAP:mainfrom
mufeso:fix_2414
Open

mufeso wants to merge 1 commit into
OpenSCAP:mainfrom
mufeso:fix_2414

Conversation

@mufeso

@mufeso mufeso commented Oct 14, 2026

Copy link
Copy Markdown

Fixes #2414

The SCE engine (src/SCE/sce_engine.c, built into libopenscap_sce and packaged in the engine-sce subpackage) falls back to oscap-run-sce-script when an SCE script can't be executed, for example when /tmp is mounted noexec, as CIS and ANSSI hardening require. In openscap.spec, the helper ended up in the utils subpackage through the %{_bindir}/* glob, and engine-sce doesn't require utils, so on systems without utils every SCE check ended in error.

This PR moves %{_bindir}/oscap-run-sce-script to the engine-sce subpackage, next to its only caller, and excludes it from utils.

Testing

  • rpmspec -P parses the modified spec; all subpackages are unchanged otherwise.
  • Behaviour, with the project's own tests/sce/sce_xccdf.xml (rule-1000, bash_passer.sh) on a noexec tmpfs: without the helper in PATH the rule ends in error; with the helper installed it passes; in a directory that allows execution it passes without the helper.
  • I searched the source tree and found no other user of oscap-run-sce-script besides sce_engine.c and the install rule in utils/CMakeLists.txt.

Notes

  • maint-1.3 has the same %files entries; I'm happy to open a backport if useful.
  • If you'd prefer the scanner subpackage instead, as suggested in the issue, I can change it.

The SCE engine (src/SCE/sce_engine.c, packaged in engine-sce) falls back to oscap-run-sce-script when an SCE script cannot be executed, for example when /tmp is mounted noexec. The helper was packaged in utils through the %{_bindir}/* glob, and engine-sce does not require utils, so SCE checks ended in error on systems without utils. Move the helper to the engine-sce subpackage, next to its only caller.

Fixes OpenSCAP#2414
@sonarqubecloud

Copy link
Copy Markdown

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.

oscap-run-sce-script is in the utils subpackage, so SCE checks fail on noexec /tmp with only the scanner installed

1 participant