-
Notifications
You must be signed in to change notification settings - Fork 0
Add Synopsys Intelligent Security Scan workflow #5
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
base: develop
Are you sure you want to change the base?
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 | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,77 @@ | ||||||||||||||||||||||||
| # This workflow uses actions that are not certified by GitHub. | ||||||||||||||||||||||||
| # They are provided by a third-party and are governed by | ||||||||||||||||||||||||
| # separate terms of service, privacy policy, and support | ||||||||||||||||||||||||
| # documentation. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| name: Synopsys Intelligent Security Scan | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||
| branches: [ "develop" ] | ||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||
| # The branches below must be a subset of the branches above | ||||||||||||||||||||||||
| branches: [ "develop" ] | ||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||
| - cron: '42 16 * * 6' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||
| analyze: | ||||||||||||||||||||||||
| name: Analyze | ||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||
| actions: read | ||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||
| security-events: write | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| - name: Synopsys Intelligent Security Scan | ||||||||||||||||||||||||
| id: prescription | ||||||||||||||||||||||||
| uses: synopsys-sig/intelligent-security-scan@48eedfcd42bc342a294dc495ac452797b2d9ff08 | ||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| ioServerUrl: ${{secrets.IO_SERVER_URL}} | ||||||||||||||||||||||||
| ioServerToken: ${{secrets.IO_SERVER_TOKEN}} | ||||||||||||||||||||||||
| workflowServerUrl: ${{secrets.WORKFLOW_SERVER_URL}} | ||||||||||||||||||||||||
| additionalWorkflowArgs: --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}} | ||||||||||||||||||||||||
| stage: "IO" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # Please note that the ID in previous step was set to prescription | ||||||||||||||||||||||||
| # in order for this logic to work also make sure that POLARIS_ACCESS_TOKEN | ||||||||||||||||||||||||
| # is defined in settings | ||||||||||||||||||||||||
| - name: Static Analysis with Polaris | ||||||||||||||||||||||||
| if: ${{steps.prescription.outputs.sastScan == 'true' }} | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
| export POLARIS_SERVER_URL=${{ secrets.POLARIS_SERVER_URL}} | ||||||||||||||||||||||||
| export POLARIS_ACCESS_TOKEN=${{ secrets.POLARIS_ACCESS_TOKEN}} | ||||||||||||||||||||||||
| wget -q ${{ secrets.POLARIS_SERVER_URL}}/api/tools/polaris_cli-linux64.zip | ||||||||||||||||||||||||
|
Comment on lines
+46
to
+48
|
||||||||||||||||||||||||
| export POLARIS_SERVER_URL=${{ secrets.POLARIS_SERVER_URL}} | |
| export POLARIS_ACCESS_TOKEN=${{ secrets.POLARIS_ACCESS_TOKEN}} | |
| wget -q ${{ secrets.POLARIS_SERVER_URL}}/api/tools/polaris_cli-linux64.zip | |
| export POLARIS_SERVER_URL=${{secrets.POLARIS_SERVER_URL}} | |
| export POLARIS_ACCESS_TOKEN=${{ secrets.POLARIS_ACCESS_TOKEN}} | |
| wget -q ${{secrets.POLARIS_SERVER_URL}}/api/tools/polaris_cli-linux64.zip |
Copilot
AI
Dec 9, 2025
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.
Missing error handling for the wget and unzip commands. If either command fails (e.g., network issues, invalid URL, corrupted zip file), the workflow will continue to the next command which could lead to unclear failures. Consider adding error handling or using set -e to fail fast on errors.
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.
Copilot open a new pull request to apply changes based on this feedback
Copilot
AI
Dec 9, 2025
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.
Inconsistent spacing in secret references. Line 58 has spaces before the closing braces in both BLACKDUCK_URL}} and BLACKDUCK_TOKEN}}, which is inconsistent with other secret references in the file.
| args: '--blackduck.url="${{ secrets.BLACKDUCK_URL}}" --blackduck.api.token="${{ secrets.BLACKDUCK_TOKEN}}" --detect.tools="SIGNATURE_SCAN,DETECTOR"' | |
| args: '--blackduck.url="${{secrets.BLACKDUCK_URL}}" --blackduck.api.token="${{secrets.BLACKDUCK_TOKEN}}" --detect.tools="SIGNATURE_SCAN,DETECTOR"' |
Copilot
AI
Dec 9, 2025
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.
Placeholder values {{PROJECT_NAME}} and {{PROJECT_VERSION}} need to be replaced with actual values. These templates are not valid GitHub Actions syntax and will be passed as literal strings to the workflow arguments.
| --polaris.project.name={{PROJECT_NAME}} --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}} | |
| --blackduck.project.name={{PROJECT_NAME}}:{{PROJECT_VERSION}} --blackduck.url=${{secrets.BLACKDUCK_URL}} --blackduck.api.token=${{secrets.BLACKDUCK_TOKEN}} | |
| --polaris.project.name=${{ github.event.repository.name }} --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}} | |
| --blackduck.project.name=${{ github.event.repository.name }}:${{ github.ref_name }} --blackduck.url=${{secrets.BLACKDUCK_URL}} --blackduck.api.token=${{secrets.BLACKDUCK_TOKEN}} |
Copilot
AI
Dec 9, 2025
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.
The additionalWorkflowArgs value spans multiple lines (68-69) without proper YAML multi-line syntax. This should use proper YAML multi-line string syntax (e.g., >- or |) to ensure the arguments are correctly interpreted as a single string value.
| additionalWorkflowArgs: --IS_SAST_ENABLED=${{steps.prescription.outputs.sastScan}} --IS_SCA_ENABLED=${{steps.prescription.outputs.scaScan}} | |
| --polaris.project.name={{PROJECT_NAME}} --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}} | |
| --blackduck.project.name={{PROJECT_NAME}}:{{PROJECT_VERSION}} --blackduck.url=${{secrets.BLACKDUCK_URL}} --blackduck.api.token=${{secrets.BLACKDUCK_TOKEN}} | |
| additionalWorkflowArgs: >- | |
| --IS_SAST_ENABLED=${{steps.prescription.outputs.sastScan}} --IS_SCA_ENABLED=${{steps.prescription.outputs.scaScan}} | |
| --polaris.project.name={{PROJECT_NAME}} --polaris.url=${{secrets.POLARIS_SERVER_URL}} --polaris.token=${{secrets.POLARIS_ACCESS_TOKEN}} | |
| --blackduck.project.name={{PROJECT_NAME}}:{{PROJECT_VERSION}} --blackduck.url=${{secrets.BLACKDUCK_URL}} --blackduck.api.token=${{secrets.BLACKDUCK_TOKEN}} |
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.
Inconsistent spacing in secret references. Lines 46-47 have a space before the closing braces (
POLARIS_SERVER_URL}}andPOLARIS_ACCESS_TOKEN}}), while other secret references in the file don't have this spacing (e.g., line 48 usessecrets.POLARIS_SERVER_URL}}). This inconsistency should be fixed for maintainability.