-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate semgrep to semgrep-agent (#4446)
- Loading branch information
Showing
11 changed files
with
128 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
set -eou pipefail | ||
|
||
SEMGREP_TOKEN=$(vault kv get -field token secret/semgrep) | ||
SEMGREP_ID=$(vault kv get -field id secret/semgrep) | ||
|
||
export SEMGREP_TOKEN | ||
export SEMGREP_ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
rules: | ||
|
||
- id: combineLatest-not-combining | ||
pattern: combineLatest([$SINGLE_EXPRESSION]) | ||
fix: $SINGLE_EXPRESSION | ||
message: combineLatest is not needed with a single argument | ||
languages: [ts] | ||
severity: WARNING | ||
|
||
- id: observable-not-ending-with-dollar-sign | ||
patterns: | ||
- pattern-either: | ||
- pattern: $VAR = $EXPR.select(...); | ||
- pattern: $VAR = $EXPR.pipe(...); | ||
- pattern: $VAR = observableOf(...) | ||
- pattern: $VAR = of(...) | ||
- pattern-not: $VAR = d3.select(...); | ||
- metavariable-regex: | ||
metavariable: '$VAR' | ||
regex: '[^$]+(?!\$)$' | ||
message: | | ||
Observable variable ($VAR) should end with a dollar sign. | ||
languages: [ts] | ||
severity: ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copied from https://github.com/returntocorp/semgrep-action/blob/develop/src/semgrep_agent/templates/.semgrepignore | ||
# Note that these are for semgrep-agent ONLY; command line semgrep does NOT use this file. | ||
|
||
# Ignore git items | ||
.gitignore | ||
.git/ | ||
:include .gitignore | ||
|
||
# Common large directories | ||
node_modules/ | ||
build/ | ||
dist/ | ||
vendor/ | ||
env/ | ||
.env/ | ||
venv/ | ||
.venv/ | ||
*.min.js | ||
|
||
# Common test directories | ||
test/ | ||
tests/ | ||
|
||
# Semgrep rules folder | ||
.semgrep | ||
|
||
# Chef customizations | ||
third_party/ | ||
*_test.go | ||
*.pb.go | ||
*.bindata.go | ||
*.spec.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.