Skip to content

Commit

Permalink
Update semgrep to current latest, by default (#20102)
Browse files Browse the repository at this point in the history
This refreshes the new semgrep backend (added in #18593, in 2.19) to use
the current latest published version (`1.46.0`, instead of `1.37.0`).

The newer version of Semgrep is slightly stricter about the formatting
of the global settings file, so this inserts a dummy `anonymous_user_id`
value.
  • Loading branch information
huonw authored Oct 31, 2023
1 parent e43dcfe commit 13f853e
Show file tree
Hide file tree
Showing 2 changed files with 368 additions and 220 deletions.
5 changes: 3 additions & 2 deletions src/python/pants/backend/tools/semgrep/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ async def partition(


# We have a hard-coded settings file to side-step
# https://github.com/returntocorp/semgrep/issues/7102, and also provide more cacheability.
# https://github.com/returntocorp/semgrep/issues/7102, and also provide more cacheability, NB. both
# keys are required.
_DEFAULT_SETTINGS = FileContent(
path="__semgrep_settings.yaml",
content=b"has_shown_metrics_notification: true",
content=b"anonymous_user_id: 00000000-0000-0000-0000-000000000000\nhas_shown_metrics_notification: true",
)


Expand Down
Loading

0 comments on commit 13f853e

Please sign in to comment.