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

Don't include libexec directories in SCA includes #959

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

jonjohnsonjr
Copy link
Contributor

Our logic for matching libdirs just used a string prefix, but didn't include a "/" at the end of the allowlisted directories. This meant we matched things under "/usr/libexec", which we probably don't want. The only APKs that has "usr/libexec" files are these neon APKs. Since it's vendoring various versions of libpq, and we don't want other packages to depend on neon (it's huge) but the libpq things directly, we don't want to expose these as provides.

Our logic for matching libdirs just used a string prefix, but didn't
include a "/" at the end of the allowlisted directories. This meant we
matched things under "/usr/libexec", which we probably don't want. The
only APKs that has "usr/libexec" files are these neon APKs. Since it's
vendoring various versions of libpq, and we don't want other packages to
depend on neon (it's huge) but the libpq things directly, we don't want
to expose these as provides.

Signed-off-by: Jon Johnson <jon.johnson@chainguard.dev>
@jonjohnsonjr jonjohnsonjr merged commit 26d65c0 into chainguard-dev:main Jan 24, 2024
32 checks passed
@kaniini
Copy link
Contributor

kaniini commented Jan 25, 2024

This PR should probably be reverted. In general, binaries in libexec are not vendored copies of other packages, but instead just normal binaries that should be analyzed like any other.

A better approach worth considering would be a configurable set of path prefixes to exempt from the SCA analyzers.

Thus, in neon.yaml you might have something like:

sca:
  protected-paths:
     - /usr/libexec/neon/*

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.

3 participants