Skip to content

Revert "[SCB-Bot] Upgraded semgrep from 0.84.0 to 0.85.0"#1044

Merged
malexmave merged 1 commit into
mainfrom
revert-1041-dependencies/upgrading-semgrep-to-0.85.0
Mar 17, 2022
Merged

Revert "[SCB-Bot] Upgraded semgrep from 0.84.0 to 0.85.0"#1044
malexmave merged 1 commit into
mainfrom
revert-1041-dependencies/upgrading-semgrep-to-0.85.0

Conversation

@malexmave
Copy link
Copy Markdown
Member

The new update for semgrep has changed how files are found - it now also considers hidden folders. This leads to the test file in the integration tests being found either twice or not at all: apparently K8s, when mounting ConfigMaps, will put the real file in a hidden folder, and then symlink to it. As there is currently an inconsistency in how symlinks are handled by semgrep, I cannot simply tell the integration test the path to the (symlink) file directly, because this will be considered as "not existing" by semgrep (see linked issue).

As I don't want to update the test case with an ugly hack (e.g., trying to wildcard my way into the hidden folder k8s uses), and don't want to update the expected number of results to two times the results we would actually expect, I'm reverting the change for now to get the CI to turn green again. When the dependency bot opens a new PR, we can find a nice way of getting the CI to pass, or wait for the next semgrep release that fixes the inconsistency in symlink handling and then merge that.

@malexmave malexmave added bug Bugs scanner Implement or update a security scanner labels Mar 17, 2022
@Weltraumschaf Weltraumschaf self-requested a review March 17, 2022 13:56
@malexmave malexmave merged commit af240ef into main Mar 17, 2022
@malexmave malexmave deleted the revert-1041-dependencies/upgrading-semgrep-to-0.85.0 branch March 17, 2022 14:01
@underyx
Copy link
Copy Markdown

underyx commented Mar 17, 2022

I wonder if you can add a .semgrepignore file that contains .* to ignore all hidden paths? Or maybe --exclude='.*'?

@malexmave
Copy link
Copy Markdown
Member Author

Good idea with the excludes. I just tested it, and it's a viable workaround. I will implement it once our bot has created a new pull request with the upgrade.

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

Labels

bug Bugs scanner Implement or update a security scanner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants