Commit b6bd58ee authored by smartcontracts's avatar smartcontracts Committed by GitHub

maint: move semgrep folder again (#12828)

Moves the semgrep folder back into .semgrep now that we worked out
how to actually execute the tests when they're located inside of
a hidden folder.
parent 15912abe
...@@ -1314,10 +1314,10 @@ workflows: ...@@ -1314,10 +1314,10 @@ workflows:
- contracts-bedrock-build - contracts-bedrock-build
- semgrep-scan: - semgrep-scan:
name: semgrep-scan-local name: semgrep-scan-local
scan_command: semgrep scan --timeout=100 --config=./semgrep --error . scan_command: semgrep scan --timeout=100 --config .semgrep/rules/ --error .
- semgrep-scan: - semgrep-scan:
name: semgrep-test name: semgrep-test
scan_command: semgrep scan --test semgrep/ scan_command: semgrep scan --test --config .semgrep/rules/ .semgrep/tests/
- go-lint - go-lint
- fuzz-golang: - fuzz-golang:
name: fuzz-golang-<<matrix.package_name>> name: fuzz-golang-<<matrix.package_name>>
......
...@@ -9,7 +9,7 @@ vendor/ ...@@ -9,7 +9,7 @@ vendor/
*.min.js *.min.js
# Semgrep rules folder # Semgrep rules folder
semgrep/ .semgrep/
# Semgrep-action log folder # Semgrep-action log folder
.semgrep_logs/ .semgrep_logs/
...@@ -3,11 +3,11 @@ issues: ...@@ -3,11 +3,11 @@ issues:
# Runs semgrep on the entire monorepo. # Runs semgrep on the entire monorepo.
semgrep: semgrep:
semgrep scan --config=semgrep --error . semgrep scan --config .semgrep/rules/ --error .
# Runs semgrep tests. # Runs semgrep tests.
semgrep-test: semgrep-test:
semgrep scan --test semgrep/ semgrep scan --test --config .semgrep/rules/ .semgrep/tests/
lint-shellcheck: lint-shellcheck:
find . -type f -name '*.sh' -not -path '*/node_modules/*' -not -path './packages/contracts-bedrock/lib/*' -not -path './packages/contracts-bedrock/kout*/*' -exec sh -c 'echo "Checking $1"; shellcheck "$1"' _ {} \; find . -type f -name '*.sh' -not -path '*/node_modules/*' -not -path './packages/contracts-bedrock/lib/*' -not -path './packages/contracts-bedrock/kout*/*' -exec sh -c 'echo "Checking $1"; shellcheck "$1"' _ {} \;
......
...@@ -163,7 +163,7 @@ semver-diff-check: build semver-diff-check-no-build ...@@ -163,7 +163,7 @@ semver-diff-check: build semver-diff-check-no-build
# Checks that the semgrep tests are valid. # Checks that the semgrep tests are valid.
semgrep-test-validity-check: semgrep-test-validity-check:
forge fmt ../../semgrep/sol-rules.t.sol --check forge fmt ../../.semgrep/tests/sol-rules.t.sol --check
# Checks that forge test names are correctly formatted. # Checks that forge test names are correctly formatted.
lint-forge-tests-check: lint-forge-tests-check:
...@@ -199,11 +199,11 @@ check-kontrol-summaries-unchanged: ...@@ -199,11 +199,11 @@ check-kontrol-summaries-unchanged:
# Runs semgrep on the contracts. # Runs semgrep on the contracts.
semgrep: semgrep:
cd ../../ && semgrep scan --config=semgrep ./packages/contracts-bedrock cd ../../ && semgrep scan --config .semgrep/rules/ ./packages/contracts-bedrock
# Runs semgrep tests. # Runs semgrep tests.
semgrep-test: semgrep-test:
cd ../../ && semgrep scan --test semgrep cd ../../ && semgrep scan --test --config .semgrep/rules/ .semgrep/tests/
# TODO: Also run lint-forge-tests-check but we need to fix the test names first. # TODO: Also run lint-forge-tests-check but we need to fix the test names first.
# Runs all checks. # Runs all checks.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment