Skip to content

tester#53

Open
HammerHam wants to merge 57 commits into923from
891
Open

tester#53
HammerHam wants to merge 57 commits into923from
891

Conversation

@HammerHam
Copy link
Copy Markdown
Owner

No description provided.

unknown and others added 30 commits April 2, 2021 21:31
They are part of the repository since 2017 they have never been updated and probably don't work anymore
It is old any never used we only update versions in this file
They are old might work but we now have the all in one image which we actively maintain and release
Part of the Travis build we use to have no longer needed as we moved to Github actions
Spring cleanup to make it a bit easier for users to only offer two options: Docker and stand alone version
…') { def mvn = tool 'Default Maven'; withSonarQubeEnv() { sh "${mvn}/bin directory
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Upgrade WebGoat to Java 15 with dependency updates and cleanup of obsolete configurations

✨ Enhancement 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Update WebGoat to Java 15 with compiler and dependency upgrades
• Fix AsciiDoctor macro implementations to use updated API (ContentNode instead of AbstractBlock)
• Remove obsolete deployment configurations (Vagrant, docker-compose, platform quickstarts, scripts)
• Update GitHub Actions workflows and add SonarQube/ShiftLeft security scanning
• Correct typos and grammar in SQL injection lesson documentation
• Update Maven dependencies to latest compatible versions

Grey Divider

File Changes

1. webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/OperatingSystemMacro.java ✨ Enhancement +8/-4

Update to AsciiDoctor API with ContentNode parameter

webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/OperatingSystemMacro.java


2. webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatTmpDirMacro.java ✨ Enhancement +7/-2

Update to AsciiDoctor API with ContentNode parameter

webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatTmpDirMacro.java


3. webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatVersionMacro.java ✨ Enhancement +7/-2

Update to AsciiDoctor API with ContentNode parameter

webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebGoatVersionMacro.java


View more (59)
4. webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfMacro.java ✨ Enhancement +6/-2

Update to AsciiDoctor API with ContentNode parameter

webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfMacro.java


5. webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfRootMacro.java ✨ Enhancement +4/-0

Add constructor and update to AsciiDoctor API

webgoat-container/src/main/java/org/owasp/webgoat/asciidoc/WebWolfRootMacro.java


6. webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java 🐞 Bug fix +1/-1

Correct SQL capitalization in user-facing message

webgoat-lessons/sql-injection/src/main/java/org/owasp/webgoat/sql_injection/advanced/SqlInjectionLesson6a.java


7. webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java 🐞 Bug fix +1/-8

Update WireMock imports and remove deprecated JUnit Rule

webgoat-lessons/xxe/src/test/java/org/owasp/webgoat/xxe/BlindSendFileAssignmentTest.java


8. docker/start.sh ✨ Enhancement +5/-1

Add informational echo messages and improve formatting

docker/start.sh


9. platformQuickStarts/GCP/GKE-Docker/gke-deploy-config.sh Miscellaneous +0/-4

Remove obsolete GCP deployment configuration file

platformQuickStarts/GCP/GKE-Docker/gke-deploy-config.sh


10. scripts/build-all.sh Miscellaneous +0/-34

Remove obsolete build script no longer needed

scripts/build-all.sh


11. scripts/build_docker.sh Miscellaneous +0/-10

Remove obsolete Docker build script

scripts/build_docker.sh


12. scripts/clean-run-docker-compose.sh Miscellaneous +0/-5

Remove obsolete docker-compose cleanup script

scripts/clean-run-docker-compose.sh


13. scripts/deploy-webgoat.sh Miscellaneous +0/-16

Remove obsolete Travis CI deployment script

scripts/deploy-webgoat.sh


14. scripts/run-docker-compose.sh Miscellaneous +0/-4

Remove obsolete docker-compose run script

scripts/run-docker-compose.sh


15. scripts/start.sh Miscellaneous +0/-18

Remove obsolete startup script

scripts/start.sh


16. .github/workflows/build.yml ⚙️ Configuration changes +18/-38

Simplify build workflow to basic GitHub Actions demo

.github/workflows/build.yml


17. .github/workflows/main.yml ⚙️ Configuration changes +32/-0

Add ShiftLeft SAST security scanning workflow

.github/workflows/main.yml


18. .github/workflows/release.yml ⚙️ Configuration changes +4/-4

Update Java version from 11 to 15 in release workflow

.github/workflows/release.yml


19. .github/workflows/sonarcloud1.yml ⚙️ Configuration changes +23/-0

Add SonarCloud analysis workflow for code quality

.github/workflows/sonarcloud1.yml


20. .github/workflows/sonarcuberun1.yml ⚙️ Configuration changes +36/-0

Add SonarQube analysis workflow for branch 891

.github/workflows/sonarcuberun1.yml


21. Jenkinsfile ⚙️ Configuration changes +24/-0

Add basic Jenkins pipeline configuration

Jenkinsfile


22. README.MD 📝 Documentation +9/-31

Remove docker-compose documentation and update Java version to 15

README.MD


23. build.yml ⚙️ Configuration changes +36/-0

Add SonarQube build and analysis workflow

build.yml


24. buildspec.yml Miscellaneous +0/-12

Remove obsolete AWS CodeBuild specification file

buildspec.yml


25. docker-compose-local.yml Miscellaneous +0/-13

Remove obsolete local docker-compose configuration

docker-compose-local.yml


26. docker-compose-postgres.yml Miscellaneous +0/-40

Remove obsolete PostgreSQL docker-compose configuration

docker-compose-postgres.yml


27. docker-compose.yml Miscellaneous +0/-22

Remove obsolete docker-compose configuration file

docker-compose.yml


28. docker/Dockerfile ✨ Enhancement +4/-4

Update base image to Java 15 and fix jar copy paths

docker/Dockerfile


29. docker/Readme.md 📝 Documentation +7/-3

Update Docker build command and improve formatting

docker/Readme.md


30. docker/pom.xml ✨ Enhancement +3/-3

Update maven-antrun-plugin and fix jar output paths

docker/pom.xml


31. docs/README.md Miscellaneous +1/-1

Add test comment to documentation

docs/README.md


32. goat-with-reverseproxy.yaml Miscellaneous +0/-43

Remove obsolete docker stack deployment configuration

goat-with-reverseproxy.yaml


33. jenkinsfile ⚙️ Configuration changes +24/-0

Add Jenkins pipeline with build test and deploy stages

jenkinsfile


34. platformQuickStarts/AWS/README.md Miscellaneous +0/-31

Remove obsolete AWS platform quickstart documentation

platformQuickStarts/AWS/README.md


35. platformQuickStarts/AWS/codepipelinebuild/01_IAM_codebuild.json Miscellaneous +0/-101

Remove obsolete AWS CodeBuild IAM configuration

platformQuickStarts/AWS/codepipelinebuild/01_IAM_codebuild.json


36. platformQuickStarts/AWS/codepipelinebuild/01_IAM_codepipeline.json Miscellaneous +0/-127

Remove obsolete AWS CodePipeline IAM configuration

platformQuickStarts/AWS/codepipelinebuild/01_IAM_codepipeline.json


37. platformQuickStarts/AWS/codepipelinebuild/01_codepiplinebuild.yml Miscellaneous +0/-123

Remove obsolete AWS CodePipeline CloudFormation template

platformQuickStarts/AWS/codepipelinebuild/01_codepiplinebuild.yml


38. platformQuickStarts/AWS/codepipelinebuild/README.md Miscellaneous +0/-64

Remove obsolete AWS CodePipeline quickstart documentation

platformQuickStarts/AWS/codepipelinebuild/README.md


39. platformQuickStarts/GCP/GKE-Docker/README.md Miscellaneous +0/-80

Remove obsolete GCP GKE deployment documentation

platformQuickStarts/GCP/GKE-Docker/README.md


40. platformQuickStarts/GCP/GKE-Docker/deploy.cfg Miscellaneous +0/-4

Remove obsolete GCP deployment configuration

platformQuickStarts/GCP/GKE-Docker/deploy.cfg


41. platformQuickStarts/GCP/GKE-Docker/webgoat_deployment_noDNSnoTLS.yml Miscellaneous +0/-39

Remove obsolete GCP Kubernetes deployment manifest

platformQuickStarts/GCP/GKE-Docker/webgoat_deployment_noDNSnoTLS.yml


42. platformQuickStarts/GCP/README.md Miscellaneous +0/-17

Remove obsolete GCP platform quickstart documentation

platformQuickStarts/GCP/README.md


43. platformQuickStarts/README.md Miscellaneous +0/-22

Remove obsolete platform quickstarts documentation

platformQuickStarts/README.md


44. pom.xml ✨ Enhancement +21/-8

Update Java to 15, add Maven prerequisite, update dependencies

pom.xml


45. webgoat-container/pom.xml ✨ Enhancement +1/-1

Update AsciiDoctor dependency to version 2.4.3

webgoat-container/pom.xml


46. webgoat-images/vagrant-training/Vagrantfile Miscellaneous +0/-35

Remove obsolete Vagrant training image configuration

webgoat-images/vagrant-training/Vagrantfile


47. webgoat-integration-tests/pom.xml ✨ Enhancement +1/-1

Update WebDriver Manager dependency to 4.3.1

webgoat-integration-tests/pom.xml


48. webgoat-lessons/challenge/pom.xml ✨ Enhancement +1/-2

Update JJWT dependency to version 0.9.1

webgoat-lessons/challenge/pom.xml


49. webgoat-lessons/cross-site-scripting/pom.xml ✨ Enhancement +1/-1

Update jsoup dependency to version 1.13.1

webgoat-lessons/cross-site-scripting/pom.xml


50. webgoat-lessons/html-tampering/pom.xml ✨ Enhancement +0/-1

Remove hardcoded spring-security-test version

webgoat-lessons/html-tampering/pom.xml


51. webgoat-lessons/insecure-deserialization/pom.xml ✨ Enhancement +0/-1

Remove hardcoded spring-security-test version

webgoat-lessons/insecure-deserialization/pom.xml


52. webgoat-lessons/insecure-login/pom.xml ✨ Enhancement +0/-1

Remove hardcoded spring-security-test version

webgoat-lessons/insecure-login/pom.xml


53. webgoat-lessons/jwt/pom.xml ✨ Enhancement +2/-2

Update JJWT and spring-security-test dependencies

webgoat-lessons/jwt/pom.xml


54. webgoat-lessons/password-reset/pom.xml ✨ Enhancement +0/-1

Remove hardcoded spring-security-test version

webgoat-lessons/password-reset/pom.xml


55. webgoat-lessons/pom.xml ✨ Enhancement +0/-28

Remove hardcoded versions and build configuration

webgoat-lessons/pom.xml


56. webgoat-lessons/secure-passwords/pom.xml ✨ Enhancement +1/-1

Update zxcvbn dependency to version 1.4.0

webgoat-lessons/secure-passwords/pom.xml


57. webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6.adoc 📝 Documentation +1/-1

Fix grammar in SQL JOIN operator documentation

webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6.adoc


58. webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6c.adoc 📝 Documentation +5/-5

Correct grammar and typos in blind SQL injection lesson

webgoat-lessons/sql-injection/src/main/resources/lessonPlans/en/SqlInjection_content6c.adoc


59. webgoat-lessons/ssrf/pom.xml ✨ Enhancement +0/-1

Remove hardcoded spring-security-test version

webgoat-lessons/ssrf/pom.xml


60. webgoat-lessons/vulnerable-components/pom.xml ✨ Enhancement +4/-4

Update ant dependencies and add version lock comments

webgoat-lessons/vulnerable-components/pom.xml


61. webgoat-lessons/xxe/pom.xml ✨ Enhancement +1/-1

Update WireMock dependency to version 2.27.2

webgoat-lessons/xxe/pom.xml


62. webwolf/pom.xml ✨ Enhancement +3/-22

Update dependencies and remove duplicate compiler configuration

webwolf/pom.xml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (6) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Hardcoded Personal Artifactory Server 🐞 Bug ⛨ Security
Description
The pom.xml adds a distributionManagement block pointing to a hardcoded public IP (35.236.103.251)
over plain HTTP. Any developer running mvn deploy will transmit Maven credentials unencrypted to
this personal/test Artifactory instance, enabling credential interception and supply chain attacks.
Code

pom.xml[R296-302]

+<distributionManagement>
+    <snapshotRepository>
+        <id>snapshots</id>
+        <name>Artifactory West-snapshots</name>
+        <url>http://35.236.103.251:8081/artifactory/hamid-maven-one-libs-snapshot-local</url>
+    </snapshotRepository>
+</distributionManagement>
Evidence
The newly added distributionManagement block uses http:// (not https://) and a hardcoded IP address.
Maven will match credentials from local settings.xml with id 'snapshots' and transmit them
unencrypted to this server. The repository name 'hamid-maven-one-libs-snapshot-local' indicates a
personal test deployment unrelated to the WebGoat project.

pom.xml[296-302]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The pom.xml contains a `&lt;distributionManagement&gt;` block pointing to a personal Artifactory server at a hardcoded public IP address over plain HTTP. This exposes Maven credentials to interception and routes artifacts to an unauthorized third-party server.

## Issue Context
The block was added at the bottom of pom.xml just before `&lt;/project&gt;`. The URL `http://35.236.103.251:8081/artifactory/hamid-maven-one-libs-snapshot-local` uses HTTP (not HTTPS) and a hardcoded IP that appears to be a personal test instance.

## Fix Focus Areas
- pom.xml[296-302]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. GitHub Actions branches Filter Misplaced 🐞 Bug ✓ Correctness
Description
In .github/workflows/build.yml, the branches key is placed inside the job definition (same level
as runs-on and steps) instead of under the on: trigger block. GitHub Actions silently ignores
unknown job-level keys, so the workflow now triggers on every push to every branch with no
restriction.
Code

.github/workflows/build.yml[R19-20]

+    branches:
+      - master # or the name of your main branch
Evidence
The on: [push] trigger at line 2 has no branch filter. The branches: key at lines 19-20 is
indented at the same YAML level as runs-on: (line 5) and steps: (line 6) — inside the job
definition — where it is not a valid key and is silently ignored. The intended master-only
restriction is never applied.

.github/workflows/build.yml[1-21]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `branches` filter is placed inside the job definition instead of under the `on:` trigger. GitHub Actions ignores it there, causing the workflow to fire on every push to every branch.

## Issue Context
The correct structure requires `branches` to be nested under `on.push`, not at the job level. The original workflow (before this PR) had a proper multi-OS, multi-JDK matrix build that was replaced with a trivial demo.

## Fix Focus Areas
- .github/workflows/build.yml[1-21]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Jenkinsfile Groovy Syntax Error 🐞 Bug ✓ Correctness
Description
In jenkinsfile (lowercase), the Build stage uses sh mvn package without quoting the argument. In
Jenkins declarative pipeline Groovy DSL, sh requires a String argument; package is a reserved
Groovy keyword, causing a parse-level compilation failure that prevents the entire pipeline from
loading.
Code

jenkinsfile[7]

+                sh mvn package
Evidence
Line 7 of jenkinsfile uses sh mvn package without quotes. sh is a Groovy method expecting a
String argument; without quotes, mvn is parsed as a variable reference and package is a reserved
Groovy keyword. The companion Jenkinsfile (uppercase) correctly quotes all its step arguments
(e.g., echo 'Doing Nothing..', sh '''#!/bin/bash\n mvn deploy\n'''), confirming the correct
pattern.

jenkinsfile[7-7]
Jenkinsfile[17-20]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `sh` step in the Build stage of `jenkinsfile` is missing quotes around its argument, causing a Groovy parse error that prevents the pipeline from loading in Jenkins.

## Issue Context
`package` is a reserved Groovy keyword. Without quoting, `sh mvn package` is invalid Groovy syntax. The correct form is `sh &#x27;mvn package&#x27;`.

## Fix Focus Areas
- jenkinsfile[7-7]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
4. ShiftLeft CLI Downloaded Without Integrity Check 🐞 Bug ⛨ Security
Description
The ShiftLeft workflow downloads a binary from a CDN URL via curl and immediately marks it
executable and runs it — with no checksum or signature verification. A compromised CDN or MITM
attack would result in arbitrary code execution in the CI runner with access to
SHIFTLEFT_ACCESS_TOKEN and GITHUB_TOKEN.
Code

.github/workflows/main.yml[R20-22]

+    - name: Download ShiftLeft CLI
+      run: |
+        curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
Evidence
The binary is fetched from https://cdn.shiftleft.io/download/sl, made executable, and then
executed at line 29 with SHIFTLEFT_ACCESS_TOKEN and GITHUB_TOKEN in the environment. No checksum
verification step exists between download and execution.

.github/workflows/main.yml[20-32]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The ShiftLeft CLI binary is downloaded and executed without any integrity verification. A tampered binary would execute with access to CI secrets.

## Issue Context
The binary is downloaded at line 22 and executed at line 29 with `SHIFTLEFT_ACCESS_TOKEN` and `GITHUB_TOKEN` in the environment. A checksum verification step must be added between download and execution.

## Fix Focus Areas
- .github/workflows/main.yml[20-29]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

5. Workflow File at Repo Root Never Executed 🐞 Bug ⛯ Reliability
Description
A build.yml file was added at the repository root instead of .github/workflows/. GitHub Actions
only discovers workflow files under .github/workflows/, so this file will never be executed —
creating dead, confusing configuration that duplicates the name of an existing workflow.
Code

build.yml[R1-5]

+name: Build
+on:
+  push:
+    branches:
+      - master # or the name of your main branch
Evidence
The file path is build.yml at the repo root, not .github/workflows/build.yml. GitHub Actions
only scans .github/workflows/ for workflow definitions. A .github/workflows/build.yml already
exists in the repository (also modified in this PR), making this root-level file a dead duplicate.

build.yml[1-5]
.github/workflows/build.yml[1-2]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A `build.yml` workflow file was placed at the repository root where GitHub Actions will never discover or execute it.

## Issue Context
GitHub Actions only executes workflows found in `.github/workflows/`. The root `build.yml` is dead configuration. A `.github/workflows/build.yml` already exists.

## Fix Focus Areas
- build.yml[1-36]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Malformed echo in Docker start.sh 🐞 Bug ⛯ Reliability
Description
In docker/start.sh, the echo command has unbalanced quotes: `echo "Browse to http://localhost" to
get started >> webgoat.log. The closing quote appears after http://localhost, leaving to get
started` as unquoted shell tokens. While bash echo currently concatenates them correctly, the
unquoted tokens are fragile and could be misinterpreted if modified to contain glob patterns or
special characters.
Code

docker/start.sh[14]

+echo "Browse to http://localhost" to get started >> webgoat.log
Evidence
The closing double-quote appears immediately after http://localhost, leaving to, get, and
started as separate unquoted arguments to echo. The correct and safe form encloses the entire
message in a single quoted string.

docker/start.sh[14-14]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `echo` command in `docker/start.sh` has unbalanced quoting, leaving shell tokens unquoted after the URL.

## Issue Context
Line 14 closes the double-quote after `http://localhost`, making `to get started` unquoted bare words. This is fragile and should be corrected to a single properly-quoted string.

## Fix Focus Areas
- docker/start.sh[14-14]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment thread pom.xml
Comment on lines +296 to +302
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>Artifactory West-snapshots</name>
<url>http://35.236.103.251:8081/artifactory/hamid-maven-one-libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Hardcoded personal artifactory server 🐞 Bug ⛨ Security

The pom.xml adds a distributionManagement block pointing to a hardcoded public IP (35.236.103.251)
over plain HTTP. Any developer running mvn deploy will transmit Maven credentials unencrypted to
this personal/test Artifactory instance, enabling credential interception and supply chain attacks.
Agent Prompt
## Issue description
The pom.xml contains a `<distributionManagement>` block pointing to a personal Artifactory server at a hardcoded public IP address over plain HTTP. This exposes Maven credentials to interception and routes artifacts to an unauthorized third-party server.

## Issue Context
The block was added at the bottom of pom.xml just before `</project>`. The URL `http://35.236.103.251:8081/artifactory/hamid-maven-one-libs-snapshot-local` uses HTTP (not HTTPS) and a hardcoded IP that appears to be a personal test instance.

## Fix Focus Areas
- pom.xml[296-302]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +19 to +20
branches:
- master # or the name of your main branch
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Github actions branches filter misplaced 🐞 Bug ✓ Correctness

In .github/workflows/build.yml, the branches key is placed inside the job definition (same level
as runs-on and steps) instead of under the on: trigger block. GitHub Actions silently ignores
unknown job-level keys, so the workflow now triggers on every push to every branch with no
restriction.
Agent Prompt
## Issue description
The `branches` filter is placed inside the job definition instead of under the `on:` trigger. GitHub Actions ignores it there, causing the workflow to fire on every push to every branch.

## Issue Context
The correct structure requires `branches` to be nested under `on.push`, not at the job level. The original workflow (before this PR) had a proper multi-OS, multi-JDK matrix build that was replaced with a trivial demo.

## Fix Focus Areas
- .github/workflows/build.yml[1-21]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread jenkinsfile
stages {
stage('Build') {
steps {
sh mvn package
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

3. Jenkinsfile groovy syntax error 🐞 Bug ✓ Correctness

In jenkinsfile (lowercase), the Build stage uses sh mvn package without quoting the argument. In
Jenkins declarative pipeline Groovy DSL, sh requires a String argument; package is a reserved
Groovy keyword, causing a parse-level compilation failure that prevents the entire pipeline from
loading.
Agent Prompt
## Issue description
The `sh` step in the Build stage of `jenkinsfile` is missing quotes around its argument, causing a Groovy parse error that prevents the pipeline from loading in Jenkins.

## Issue Context
`package` is a reserved Groovy keyword. Without quoting, `sh mvn package` is invalid Groovy syntax. The correct form is `sh 'mvn package'`.

## Fix Focus Areas
- jenkinsfile[7-7]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +20 to +22
- name: Download ShiftLeft CLI
run: |
curl https://cdn.shiftleft.io/download/sl > ${GITHUB_WORKSPACE}/sl && chmod a+rx ${GITHUB_WORKSPACE}/sl
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

4. Shiftleft cli downloaded without integrity check 🐞 Bug ⛨ Security

The ShiftLeft workflow downloads a binary from a CDN URL via curl and immediately marks it
executable and runs it — with no checksum or signature verification. A compromised CDN or MITM
attack would result in arbitrary code execution in the CI runner with access to
SHIFTLEFT_ACCESS_TOKEN and GITHUB_TOKEN.
Agent Prompt
## Issue description
The ShiftLeft CLI binary is downloaded and executed without any integrity verification. A tampered binary would execute with access to CI secrets.

## Issue Context
The binary is downloaded at line 22 and executed at line 29 with `SHIFTLEFT_ACCESS_TOKEN` and `GITHUB_TOKEN` in the environment. A checksum verification step must be added between download and execution.

## Fix Focus Areas
- .github/workflows/main.yml[20-29]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants