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

fix: prevent nonroot docker builds from being tagged as latest #8613

Closed
wants to merge 1 commit into from

Conversation

zzeleznick
Copy link
Contributor

Description

Customers have reported issues with running our latest semgrep release versions 1.38.0 and 1.38.2. This is due to our non-root docker image having the latest tag applied.

Screenshot 2023-09-01 at 6 21 05 PM

As noted in actions/checkout#956 and actions/checkout#1014, non-root containers seem to fail during the checkout step with an error message like

/usr/bin/docker exec  5b033937ed15061a8f606fa5f3805d0794caf9e04e3c12576fda15d25bde22ab sh -c "cat /etc/*release | grep ^ID"
node:internal/fs/utils:344
    throw err;
    ^

Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/save_state_c7001c04-a974-4f62-8e53-a488[14](https://github.com/SensoftInc/imx8mp_yocto/actions/runs/3490287639/jobs/5841522655#step:3:15)7475c5'

Addresses #8601

Fix

PR checklist:

  • Purpose of the code is evident to future readers
  • Tests included or PR comment includes a reproducible test plan
  • Documentation is up-to-date
  • A changelog entry was added to changelog.d for any user-facing change
  • Change has no security implications (otherwise, ping security team)

If you're unsure about any of this, please see:

@zzeleznick zzeleznick marked this pull request as ready for review September 2, 2023 01:48
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2023

🚫 The whole benchmark suite is too slow: +9.7% (+1.097 s)

14 benchmarks, 9.7% slower on average.

Individual deviations greater than 20% from the baseline are reported. An individual performance degradation of over 30% or a global degradation of over 7% is an error and will block the pull request. See run output for full results ('Show all checks' > 'Tests / semgrep benchmark tests' 'Details').

@bmahe
Copy link
Contributor

bmahe commented Sep 2, 2023

Makes sense.
Thanks @zzeleznick !

@aryx
Copy link
Collaborator

aryx commented Sep 2, 2023

superseded by #8615 for now

@aryx aryx closed this Sep 2, 2023
@cgdolan
Copy link
Contributor

cgdolan commented Sep 5, 2023

Heads up that this will prevent customers from getting the auto-updating non-root images we promised with returntocorp/semgrep:latest-nonroot. Looks like the suffix option to docker-metadata-action applies to all tags except latest (sigh) which is why non-root images sometimes got pushed to latest (there was a race between the root and non-root docker push actions where the last one won). I think the fix is actually to set suffix=-nonroot,onlatest=true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants