Skip to content

[SCB-Bot] Upgraded semgrep from 0.85.0 to 0.92.0#1127

Merged
J12934 merged 7 commits intomainfrom
dependencies/upgrading-semgrep-to-0.89.0
May 12, 2022
Merged

[SCB-Bot] Upgraded semgrep from 0.85.0 to 0.92.0#1127
J12934 merged 7 commits intomainfrom
dependencies/upgrading-semgrep-to-0.89.0

Conversation

@secureCodeBoxBot
Copy link
Copy Markdown
Contributor

@secureCodeBoxBot secureCodeBoxBot commented Apr 21, 2022

This is an automated Pull Request by the SCB-Bot. It upgrades semgrep from 0.85.0 to 0.92.0

Release changes : here

@malexmave
Copy link
Copy Markdown
Member

malexmave commented Apr 21, 2022

The reason why the CI is failing at this point is because the semgrep scanner dockerfile is now using the root user, and "RunAsNonRoot" is set on our end.

In addition, semgrep fixed a regression that I had previously implemented a workaround for, making the workaround harmful.

I set runAsNonRoot: false and removed the workaround to fix the issues.

To whoever will review this: Is it okay to have the container run as root, or do we need to have a separate container that we build based on the official one just to change the user the code is running as? According to semgrep, the change to the root user was made because otherwise they had problems running the image as part of a CI job, so it was an intentional change that is unlikely to be reverted soon.

@J12934
Copy link
Copy Markdown
Member

J12934 commented Apr 21, 2022

It's "ok'ish", it will likely cause the scan type to fail on a lot of clusters as a lot of cluster enforece running as non root.

You can potentially overwrite this semgrep change by using the runAsUser: <user_id_here> in pods security context.

@malexmave
Copy link
Copy Markdown
Member

I filed an issue with semgrep (where I also corrected some misconception I had about how this change was introduced, so some of the stuff I wrote above was incorrect). Let's see what the response is there before merging this.

@malexmave
Copy link
Copy Markdown
Member

A semgrep dev confirmed that the change was intentional and will not be reverted. So, we can either build our own Docker image that simply adds a new user and defaults to using it, or allow the existing image to run as root. Preferences?

@malexmave malexmave changed the title [SCB-Bot] Upgraded semgrep from 0.85.0 to 0.89.0 [SCB-Bot] Upgraded semgrep from 0.85.0 to 0.90.0 Apr 27, 2022
@malexmave malexmave changed the title [SCB-Bot] Upgraded semgrep from 0.85.0 to 0.90.0 [SCB-Bot] Upgraded semgrep from 0.85.0 to 0.91.0 May 4, 2022
@malexmave malexmave changed the title [SCB-Bot] Upgraded semgrep from 0.85.0 to 0.91.0 [SCB-Bot] Upgraded semgrep from 0.85.0 to 0.92.0 May 12, 2022
@github-actions
Copy link
Copy Markdown

github-actions bot commented May 12, 2022

MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Elapsed time
✅ GIT git_diff yes no 0.18s
⚠️ JAVASCRIPT eslint 1 1 0.69s
✅ SPELL misspell 3 0 0.04s
⚠️ YAML prettier 2 1 0.51s
⚠️ YAML v8r 2 1 2.17s
⚠️ YAML yamllint 2 1 0.13s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

secureCodeBoxBot and others added 7 commits May 12, 2022 15:01
Signed-off-by: secureCodeBoxBot <securecodebox@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
@malexmave malexmave force-pushed the dependencies/upgrading-semgrep-to-0.89.0 branch from 395f706 to e999efb Compare May 12, 2022 13:03
@malexmave malexmave requested a review from J12934 May 12, 2022 14:34
@J12934 J12934 added the breaking Changes requiring a major release label May 12, 2022
@J12934 J12934 merged commit dffe77b into main May 12, 2022
@J12934 J12934 deleted the dependencies/upgrading-semgrep-to-0.89.0 branch May 12, 2022 14:44
@J12934
Copy link
Copy Markdown
Member

J12934 commented May 12, 2022

@malexmave I've added the breaking label so that we don't forget to put a note about this root change in the release notes

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

Labels

breaking Changes requiring a major release dependencies Pull requests that update a dependency file scanner Implement or update a security scanner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants