Skip to content

Commit 9c910b9

Browse files
committed
ci: fix script injection vulnerability in GitHub Actions workflow
1 parent e1ac2f4 commit 9c910b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
mkdir -p ./pr/japicmp
9494
mkdir -p target/japicmp
9595
mkdir -p target/jacoco-report
96-
echo "$PR_NUMBER" > ./pr/NR
97-
echo "$PR_SHA" > ./pr/SHA
96+
echo "$PR_NUMBER" | tr -cd '0-9' > ./pr/NR
97+
echo "$PR_SHA" | tr -cd 'a-fA-F0-9' > ./pr/SHA
9898
cp -R target/japicmp/default-cli.xml ./pr/japicmp/default-cli.xml
9999
cp target/jacoco-report/cobertura.xml ./pr/jacoco-report/cobertura.xml
100100
cp target/jacoco-report/cobertura-it.xml ./pr/jacoco-report/cobertura-it.xml

0 commit comments

Comments
 (0)