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

bug(query): false positive from dockerfile/apt_get_install_lists_were_not_deleted #6892

Open
rossi-fi opened this issue Feb 20, 2024 · 2 comments
Labels
bug Something isn't working community Community contribution dockerfile query New query feature

Comments

@rossi-fi
Copy link

rossi-fi commented Feb 20, 2024

It's common to use DEBIAN_FRONTEND=noninteractive apt-get install package. However the variable causes a false positive even though the install command is followed by cleanup.

Expected Behavior

No vulnerabilities reported

Actual Behavior

Apt Get Install Lists Were Not Deleted

Workaround

Remove variable from apt-get install and precede it with dpkg-reconfigure debconf --frontend=noninteractive

@rossi-fi rossi-fi added bug Something isn't working community Community contribution labels Feb 20, 2024
@rossi-fi rossi-fi changed the title False positi False positive in dockerfile/apt_get_install_lists_were_not_deleted Feb 20, 2024
@github-actions github-actions bot added dockerfile query New query feature labels Feb 20, 2024
@rossi-fi rossi-fi changed the title False positive in dockerfile/apt_get_install_lists_were_not_deleted bug: false positive in dockerfile/apt_get_install_lists_were_not_deleted Feb 20, 2024
@github-actions github-actions bot removed the query New query feature label Feb 20, 2024
@rossi-fi rossi-fi changed the title bug: false positive in dockerfile/apt_get_install_lists_were_not_deleted bug(rule): false positive from dockerfile/apt_get_install_lists_were_not_deleted Feb 20, 2024
@rossi-fi rossi-fi changed the title bug(rule): false positive from dockerfile/apt_get_install_lists_were_not_deleted bug(query): false positive from dockerfile/apt_get_install_lists_were_not_deleted Feb 20, 2024
@github-actions github-actions bot added the query New query feature label Feb 20, 2024
@EduardoSemanas
Copy link
Contributor

Hi @rossi-fi! I created the following code sample for this issue, which doesn't reproduce the false positive:

FROM busyboxneg6
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update;
apt-get install --no-install-recommends -y python;
apt-get clean

Do you think it covers it?

@rossi-fi
Copy link
Author

Hi @EduardoSemanas

Using ARG to declare the variable is a valid workaround to avoid the false positive. Ideally the rules could be modified so one doesn't need to code around tool behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution dockerfile query New query feature
Projects
None yet
Development

No branches or pull requests

2 participants