Skip to content

Commit 2fbdb02

Browse files
Replace path traversal hack with $REGISTRY_PATH and $REGISTRY_MODULE_PATH env vars (#287)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e8cb18a commit 2fbdb02

File tree

12 files changed

+11
-16
lines changed

12 files changed

+11
-16
lines changed

scanners/boostsecurityio/boost-sca/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ setup:
5555
- name: Utility scripts
5656
run: |
5757
mkdir -p $SETUP_PATH/pre-scan-checks/
58-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/trivy-fs/prescan_checks.sh $SETUP_PATH/pre-scan-checks/trivy
58+
cp $REGISTRY_PATH/scanners/boostsecurityio/trivy-fs/prescan_checks.sh $SETUP_PATH/pre-scan-checks/trivy
5959
- name: download trivy
6060
environment:
6161
VERSION: 0.67.2

scanners/boostsecurityio/bundler-audit/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ setup:
1111
- name: Utility scripts
1212
run: |
1313
mkdir -p $SETUP_PATH/pre-scan-checks/
14-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/bundler-audit/prescan_checks.sh $SETUP_PATH/pre-scan-checks/bundler
14+
cp $REGISTRY_MODULE_PATH/prescan_checks.sh $SETUP_PATH/pre-scan-checks/bundler
1515
1616
config:
1717
support_diff_scan: true

scanners/boostsecurityio/gitleaks-full/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ setup:
5353
chmod +x gitleaks
5454
- name: Copy Boost Gitleaks Rules
5555
run: |
56-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/gitleaks/boost.toml $SETUP_PATH/
56+
cp $REGISTRY_PATH/scanners/boostsecurityio/gitleaks/boost.toml $SETUP_PATH/
5757
5858
steps:
5959
- scan:

scanners/boostsecurityio/gitleaks/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ setup:
5252
chmod +x gitleaks
5353
- name: Copy Boost Gitleaks Rules
5454
run: |
55-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/gitleaks/boost.toml $SETUP_PATH/
55+
cp $REGISTRY_MODULE_PATH/boost.toml $SETUP_PATH/
5656
5757
steps:
5858
- scan:

scanners/boostsecurityio/gosec/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ setup:
1616
- name: Utility scripts
1717
run: |
1818
mkdir -p $SETUP_PATH/pre-scan-checks/
19-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/gosec/prescan_checks.sh $SETUP_PATH/pre-scan-checks/gosec
19+
cp $REGISTRY_MODULE_PATH/prescan_checks.sh $SETUP_PATH/pre-scan-checks/gosec
2020
2121
steps:
2222
- run: $SETUP_PATH/pre-scan-checks/gosec

scanners/boostsecurityio/npm-audit/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ setup:
1616
- name: Utility scripts
1717
run: |
1818
mkdir -p $SETUP_PATH/pre-scan-checks/
19-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/npm-audit/prescan_checks.sh $SETUP_PATH/pre-scan-checks/npm-audit
19+
cp $REGISTRY_MODULE_PATH/prescan_checks.sh $SETUP_PATH/pre-scan-checks/npm-audit
2020
2121
steps:
2222
- run: $SETUP_PATH/pre-scan-checks/npm-audit

scanners/boostsecurityio/osv-scanner/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ setup:
5656
- name: Utility scripts
5757
run: |
5858
mkdir -p $SETUP_PATH/pre-scan-checks/
59-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/osv-scanner/prescan_checks.sh $SETUP_PATH/pre-scan-checks/osv-scanner
59+
cp $REGISTRY_MODULE_PATH/prescan_checks.sh $SETUP_PATH/pre-scan-checks/osv-scanner
6060
6161
steps:
6262
- run: $SETUP_PATH/pre-scan-checks/osv-scanner

scanners/boostsecurityio/osv-scanner/prescan_checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ while IFS= read -r line; do
55
then
66
exit 0
77
fi
8-
done < $SETUP_PATH/../../registry/scanners/boostsecurityio/osv-scanner/filelist.txt
8+
done < $REGISTRY_MODULE_PATH/filelist.txt
99
>&2 echo "Scan misconfiguration:"
1010
>&2 echo " OSV-Scanner scan did not run because no supported files were detected"
1111
>&2 echo " See documentation list of supported file types: https://google.github.io/osv-scanner/supported-languages-and-lockfiles/"

scanners/boostsecurityio/trivy-fs/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ setup:
5555
- name: Utility scripts
5656
run: |
5757
mkdir -p $SETUP_PATH/pre-scan-checks/
58-
cp $SETUP_PATH/../../registry/scanners/boostsecurityio/trivy-fs/prescan_checks.sh $SETUP_PATH/pre-scan-checks/trivy
58+
cp $REGISTRY_MODULE_PATH/prescan_checks.sh $SETUP_PATH/pre-scan-checks/trivy
5959
- name: download trivy
6060
environment:
6161
VERSION: 0.67.2

scanners/boostsecurityio/trivy-fs/prescan_checks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if [ "$(find . -name "$line" | wc -l)" != "0" ]
55
then
66
exit 0
77
fi
8-
done < $SETUP_PATH/../../registry/scanners/boostsecurityio/trivy-fs/filelist.txt
8+
done < $REGISTRY_PATH/scanners/boostsecurityio/trivy-fs/filelist.txt
99
>&2 echo "Scan misconfiguration:"
1010
>&2 echo " Trivy scan did not run because no supported files were detected"
1111
>&2 echo " See documentation list of supported file types: https://trivy.dev/v0.61/docs/coverage/language/"

0 commit comments

Comments
 (0)