Skip to content

Commit

Permalink
fix: semgrep needs to be on PATH (#439)
Browse files Browse the repository at this point in the history
starting with 1.94.0, if semgrep is not on PATH, its not able to run and
throws:

```
Error: exception Unix_error: No such file or directory execvp pysemgrep
```
  • Loading branch information
miki725 authored Nov 5, 2024
1 parent dc55667 commit a470a59
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## On the `main` branch

### Fixes

- When running `semgrep`, its always added to `PATH`,
as otherwise semgrep is not able to find `pysemgrep` folder.
([#439](https://github.com/crashappsec/chalk/pull/439))

## 0.4.13

**Oct 10, 2024**
Expand Down
4 changes: 4 additions & 0 deletions src/configs/sastconfig.c4m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ func semgrep_system() {
trace("find_semgrep: Unable to find semgrep in $PATH")
} else {
trace("find_semgrep: found semgrep in $PATH: " + result)
# ensure semgrep is on PATH
# https://github.com/semgrep/semgrep/issues/10652
head, tail := path_split(result)
result := "PATH=" + head + ":$PATH " + result
}
}

Expand Down

0 comments on commit a470a59

Please # to comment.