-
Notifications
You must be signed in to change notification settings - Fork 9
Bugfix/broken pipeline v2 #832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,10 +16,11 @@ inputs: | |||||||
| description: The Maven version the build shall run with. | ||||||||
| required: true | ||||||||
| version: | ||||||||
| description: The project version to report to Black Duck (e.g. release tag). | ||||||||
| required: true | ||||||||
| description: The project version to report to Black Duck (e.g. release tag). If empty, falls back to the Maven `revision` reduced to major-minor. | ||||||||
| required: false | ||||||||
| default: '' | ||||||||
| scan_mode: | ||||||||
| description: The scan mode to use (FULL or RAPID) | ||||||||
| description: The scan mode to use (FULL uploads a report to the Black Duck server; RAPID is a fast policy gate without server upload). | ||||||||
| default: 'FULL' | ||||||||
| required: false | ||||||||
|
|
||||||||
|
|
@@ -38,6 +39,19 @@ runs: | |||||||
| with: | ||||||||
| maven-version: ${{ inputs.maven-version }} | ||||||||
|
|
||||||||
| - name: Resolve Project Version | ||||||||
| id: resolve-version | ||||||||
| run: | | ||||||||
| if [ -n "${{ inputs.version }}" ]; then | ||||||||
| VERSION="${{ inputs.version }}" | ||||||||
| else | ||||||||
| REVISION=$(mvn help:evaluate -Dexpression=revision -q -DforceStdout) | ||||||||
| VERSION=$(echo "$REVISION" | cut -d. -f1,2) | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug:
Consider using
Suggested change
Double-check suggestion before committing. Edit this comment for amendments. Please provide feedback on the review comment by checking the appropriate box:
|
||||||||
| fi | ||||||||
| echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT" | ||||||||
| echo "Resolved BlackDuck project version: $VERSION" | ||||||||
| shell: bash | ||||||||
|
|
||||||||
| - name: BlackDuck Security Scan | ||||||||
| uses: blackduck-inc/black-duck-security-scan@659a0742e793a093377fab3117b0d90f23b04bfa # v2.9.0 | ||||||||
| with: | ||||||||
|
|
@@ -47,11 +61,15 @@ runs: | |||||||
| github_token: ${{ inputs.github_token }} | ||||||||
| detect_args: > | ||||||||
| --detect.project.name=com.sap.cds.feature.attachments | ||||||||
| --detect.project.version.name=${{ inputs.version }} | ||||||||
| --detect.project.version.name=${{ steps.resolve-version.outputs.VERSION }} | ||||||||
| --detect.project.group.name=CDSJAVA-OPEN-SOURCE | ||||||||
| --detect.included.detector.types=MAVEN | ||||||||
| --detect.excluded.directories=**/*test*,**/samples/** | ||||||||
| --detect.maven.included.modules=cds-feature-attachments,cds-feature-attachments-oss,cds-feature-attachments-fs | ||||||||
| --detect.maven.excluded.scopes=test,provided | ||||||||
| --detect.tools=DETECTOR,BINARY_SCAN | ||||||||
| --detect.timeout=6000 | ||||||||
| --detect.risk.report.pdf=false | ||||||||
| --blackduck.signature.scanner.memory=4096 | ||||||||
| --blackduck.trust.cert=true | ||||||||
| --logging.level.detect=INFO | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security: Script injection via
${{ inputs.version }}interpolated directly into shell scriptinputs.versionis interpolated inline into therunscript at lines 45–46. A malicious value containing shell metacharacters (e.g."; malicious_cmd #) would be executed as part of the shell script. The input value should be passed through an environment variable instead.Consider assigning the input to an env var and referencing it in the script body:
Double-check suggestion before committing. Edit this comment for amendments.
Please provide feedback on the review comment by checking the appropriate box: