Skip to content

Commit

Permalink
Merge pull request #52 from veracode/REPO-723-differentiate-between-s…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeradcliffe authored Jun 28, 2024
2 parents 0ebfa99 + fcd26f2 commit 47da2be
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- name: Verify Veracode API credentials
id: verify_api_creds
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validateVeracodeApiCreds
token: ${{ github.event.client_payload.token }}
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Verify Policy name
id: verify_policy_name
if: success()
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validatePolicyName
token: ${{ github.event.client_payload.token }}
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Veracode Pipeline Results
if: always()
id: prepare-results
uses: Veracode/[email protected].2
uses: Veracode/[email protected].3
with:
action: 'preparePipelineResults'
token: ${{ github.event.client_payload.token }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/binary-ready-veracode-sast-policy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- name: Verify Veracode API credentials
id: verify_api_creds
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validateVeracodeApiCreds
token: ${{ github.event.client_payload.token }}
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Verify Policy name
id: verify_policy_name
if: success()
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validatePolicyName
token: ${{ github.event.client_payload.token }}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Veracode Policy Results
id: prepare-results
if: always()
uses: Veracode/[email protected].2
uses: Veracode/[email protected].3
with:
action: 'preparePolicyResults'
token: ${{ github.event.client_payload.token }}
Expand All @@ -107,7 +107,7 @@ jobs:
if: ${{ github.event.client_payload.user_config.sandbox_scan.execute_remove_sandbox_action && always() }}
name: Remove Sandbox
steps:
- uses: veracode/[email protected].2
- uses: veracode/[email protected].3
with:
action: 'removeSandbox'
vid: ${{ secrets.VERACODE_API_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/template-register.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Register build
id: register-build
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: registerBuild
token: ${{ github.event.client_payload.token }}
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/veracode-build-artifact-for-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
build:
if: ${{ inputs.event_name == 'java-pipeline-scan' || inputs.event_name == 'java-policy-scan' || inputs.event_name == 'java-sandbox-scan' || inputs.event_name == 'unidentified-lang-pipeline-scan' || inputs.event_name == 'unidentified-lang-policy-scan' || inputs.event_name == 'unidentified-lang-sandbox-scan' }}
if: ${{ inputs.event_name == 'java-pipeline-scan' || inputs.event_name == 'java-policy-scan' || inputs.event_name == 'java-sandbox-scan' || inputs.event_name == 'unidentified-lang-pipeline-scan' || inputs.event_name == 'unidentified-lang-policy-scan' || inputs.event_name == 'unidentified-lang-sandbox-scan' || inputs.event_name == 'dot-net-pipeline-scan' || inputs.event_name == 'dot-net-policy-scan' || inputs.event_name == 'dot-net-sandbox-scan'}}
uses: ./.github/workflows/veracode-default-build.yml
with:
repository: ${{ inputs.repository }}
Expand Down Expand Up @@ -48,14 +48,6 @@ jobs:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ inputs.token }}

build-dot-net-package:
if: ${{ inputs.event_name == 'dot-net-pipeline-scan' || inputs.event_name == 'dot-net-policy-scan' || inputs.event_name == 'dot-net-sandbox-scan'}}
uses: ./.github/workflows/veracode-build-dot-net.yml
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ inputs.token }}

build-go-package:
if: ${{ inputs.event_name == 'go-pipeline-scan' || inputs.event_name == 'go-policy-scan' || inputs.event_name == 'go-sandbox-scan'}}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/veracode-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

on:
repository_dispatch:
types:
types:
- java-maven-pipeline-scan
- java-maven-policy-scan
- java-gradle-pipeline-scan
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
register:
uses: ./.github/workflows/veracode-check-run.yml
with:
check_run_name: ${{ github.workflow }}
check_run_name: ${{ github.workflow }} - ${{ contains(github.event.action, 'policy') && 'Policy' || 'Pipeline' }}
head_sha: ${{ github.event.client_payload.sha }}
repositroy_owner: ${{ github.event.client_payload.repository.owner }}
repositroy_name: ${{ github.event.client_payload.repository.name }}
Expand All @@ -54,7 +54,7 @@ jobs:
steps:
- name: Verify Veracode API credentials
id: verify_api_creds
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validateVeracodeApiCreds
token: ${{ github.event.client_payload.token }}
Expand All @@ -63,11 +63,11 @@ jobs:
appname: ${{ github.event.client_payload.user_config.profile_name }}
source_repository: ${{ github.event.client_payload.repository.full_name }}
check_run_id: ${{ needs.register.outputs.run_id }}

- name: Verify Policy name
id: verify_policy_name
if: success()
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validatePolicyName
token: ${{ github.event.client_payload.token }}
Expand All @@ -81,7 +81,7 @@ jobs:
start_line: ${{ github.event.client_payload.annotationObj.start_line }}
end_line: ${{ github.event.client_payload.annotationObj.end_line }}
break_build_invalid_policy: ${{github.event.client_payload.break_build_invalid_policy }}

build:
needs: validations
uses: ./.github/workflows/veracode-build-artifact-for-scanning.yml
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
filter_mitigated_flaws: ${{ github.event.client_payload.user_config.filter_mitigated_flaws }}
language: ${{ github.event.client_payload.repository.language }}
secrets: inherit

policy_scan:
needs: [build, register]
if: contains(github.event.action, 'policy')
Expand All @@ -136,4 +136,4 @@ jobs:
break_build_on_error: ${{ github.event.client_payload.user_config.break_build_on_error }}
filter_mitigated_flaws: ${{ github.event.client_payload.user_config.filter_mitigated_flaws }}
language: ${{ github.event.client_payload.repository.language }}
secrets: inherit
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/veracode-default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: veracode-artifact
path: /__w/veracode/veracode/veracode-artifact.zip
path: /__w/veracode/veracode/veracode-artifacts/*
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/workflows/veracode-iac-secrets-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- name: Verify Veracode API credentials
id: verify_api_creds
uses: veracode/[email protected].2
uses: veracode/[email protected].3
with:
action: validateVeracodeApiCreds
token: ${{ github.event.client_payload.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/veracode-pipeline-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Veracode Pipeline Results
if: always()
id: prepare-results
uses: Veracode/[email protected].2
uses: Veracode/[email protected].3
with:
action: 'preparePipelineResults'
token: ${{ inputs.token }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/veracode-policy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Veracode Policy Results
id: prepare-results
if: always()
uses: Veracode/[email protected].2
uses: Veracode/[email protected].3
with:
action: 'preparePolicyResults'
token: ${{ inputs.token }}
Expand All @@ -107,7 +107,7 @@ jobs:
if: ${{ github.event.client_payload.user_config.sandbox_scan.execute_remove_sandbox_action && always() }}
name: Remove Sandbox
steps:
- uses: veracode/[email protected].2
- uses: veracode/[email protected].3
with:
action: 'removeSandbox'
vid: ${{ secrets.VERACODE_API_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/veracode-remove-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
name: Remove Sandbox
steps:
- uses: veracode/[email protected].2
- uses: veracode/[email protected].3
with:
action: 'removeSandbox'
vid: ${{ secrets.VERACODE_API_ID }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
.idea

0 comments on commit 47da2be

Please sign in to comment.