Skip to content

Commit 264e0e0

Browse files
authored
Merge pull request #63 from solacecommunity/add-fossa-sca-scanning
Add FOSSA SCA scanning and dependency manifest registration
1 parent 16d683a commit 264e0e0

3 files changed

Lines changed: 94 additions & 0 deletions

File tree

.fossa.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 3
2+
3+
project:
4+
locator: solacecommunity_spring-cloud-stream-request-reply
5+
id: solacecommunity_spring-cloud-stream-request-reply
6+
name: spring-cloud-stream-request-reply
7+
teams: []
8+
labels:
9+
- java
10+
11+
vendoredDependencies:
12+
forceRescans: false
13+
scanMethod: CLILicenseScan
14+
licenseScanPathFilters:
15+
exclude:
16+
- "./.git"
17+
- "./.github"
18+
19+
paths:
20+
exclude:
21+
- ./.git
22+
- ./.github
23+
24+
telemetry:
25+
scope: full

.github/workflow-config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"sca_scanning": {
3+
"fossa": {
4+
"policy": { "mode": "REPORT" },
5+
"vulnerability": { "mode": "REPORT" }
6+
}
7+
}
8+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: SCA Scan
2+
on:
3+
pull_request:
4+
branches: [master]
5+
push:
6+
branches: [master]
7+
8+
permissions:
9+
contents: read
10+
id-token: write
11+
packages: read
12+
actions: read
13+
statuses: write
14+
checks: write
15+
pull-requests: write
16+
17+
jobs:
18+
sca_scan:
19+
uses: SolaceDev/solace-public-workflows/.github/workflows/sca-scan-and-guard.yaml@main
20+
with:
21+
setup_actions: '["setup-java", "maven-settings"]'
22+
java_distribution: temurin
23+
secrets:
24+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
25+
26+
update_manifest:
27+
needs: sca_scan
28+
# The manifest records what landed on the default branch, so it must never
29+
# be written from a PR run -- the scan still runs, the write does not.
30+
if: >-
31+
needs.sca_scan.result == 'success'
32+
&& github.event_name == 'push'
33+
&& github.ref_name == github.event.repository.default_branch
34+
runs-on: ubuntu-latest
35+
permissions:
36+
id-token: write
37+
contents: read
38+
packages: read
39+
steps:
40+
- name: Configure AWS credentials
41+
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
42+
with:
43+
role-to-assume: ${{ secrets.MANIFEST_AWS_ROLE }}
44+
aws-region: us-east-1
45+
46+
- name: Update solace-cloud-manifest
47+
uses: SolaceDev/solace-public-workflows/.github/actions/cicd-helper@main
48+
with:
49+
rc_step: add_item_from_json_to_dynamodb_table
50+
ddb_table_name: solace-cloud-manifest
51+
ddb_partition_key: squad
52+
ddb_sort_key: repository
53+
ddb_item_to_be_added: |
54+
{
55+
"squad": "cto",
56+
"repository": "${{ github.event.repository.name }}",
57+
"dev": {
58+
"sha": "${{ github.sha }}",
59+
"version": "${{ github.ref_name }}"
60+
}
61+
}

0 commit comments

Comments
 (0)