Skip to content

Commit 7cddce1

Browse files
Add FINOS licensing actions and release cleanup
1 parent a0dd5f0 commit 7cddce1

File tree

4 files changed

+96
-1
lines changed

4 files changed

+96
-1
lines changed

.github/workflows/cve-scanning.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CVE Scanning for Maven
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- 'pom.xml'
10+
- 'allow-list.xml'
11+
- '.github/workflows/cve-scanning.yml'
12+
pull_request:
13+
paths:
14+
- 'pom.xml'
15+
- 'allow-list.xml'
16+
- '.github/workflows/cve-scanning.yml'
17+
18+
jobs:
19+
depcheck:
20+
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: ./.github/actions/maven-build
26+
with:
27+
run-tests: false
28+
- name: CVE scanning
29+
uses: dependency-check/[email protected]
30+
env:
31+
JAVA_HOME: /opt/jdk
32+
with:
33+
project: 'Rune Python Runtime'
34+
path: '.'
35+
format: 'HTML'
36+
out: 'reports'
37+
args: >
38+
--suppression allow-list.xml
39+
--failOnCVSS 7
40+
- name: Upload results
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: CVE Scan Report ${{ strategy.job-index }}
44+
path: ${{github.workspace}}/reports
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: License Scanning for Maven
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- 'pom.xml'
10+
- '.github/workflows/license-scanning.yml'
11+
pull_request:
12+
paths:
13+
- 'pom.xml'
14+
- '.github/workflows/license-scanning.yml'
15+
16+
env:
17+
ALLOW_LICENSES: "'The Apache Software License, Version 2.0' and licenses/license/name!='BSD' and licenses/license/name!='BSD-style license' and licenses/license/name!='Apache License, Version 2.0'"
18+
REPORT_PATH: "target/generated-resources/licenses.xml"
19+
20+
jobs:
21+
scan:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
module-folder: ["./", "./examples", "./rosetta-source"]
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Install XQ
29+
run: pip install xq
30+
- uses: ./.github/actions/maven-build
31+
with:
32+
run-tests: false
33+
- name: License XML report
34+
run: mvn org.codehaus.mojo:license-maven-plugin:2.0.0:download-licenses
35+
- name: Validate XML report
36+
run: |
37+
LICENSE_REPORT=`xq "//dependency[licenses/license/name!=${{ env.ALLOW_LICENSES }}]" ./${{ env.REPORT_PATH }}`
38+
LINES_FOUND=`echo $LICENSE_REPORT | wc -l`
39+
echo "License issues found ..."
40+
if [ $LINES_FOUND -gt 1 ]; then echo $LICENSE_REPORT ; exit -1; fi
41+
working-directory: ${{ matrix.module-folder }}
42+
- name: Upload license reports
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: license-reports-${{ strategy.job-index }}
46+
path: '**/dependencies.html'
47+
- name: Upload license XML reports
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: license-xml-report-${{ strategy.job-index }}
51+
path: '**/${{ env.REPORT_PATH }}'

LICENSE.spdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ DataLicense: CC0-1.0
33
Creator: CLOUDRISK Limited and FT Advisory LLC
44
PackageName: Rune Python Runtime
55
PackageOriginator: CLOUDRISK Limited and FT Advisory LLC
6-
PackageHomePage: https://github.com/finos/{project slug}
6+
PackageHomePage: https://github.com/finos/rune-python-runtime
77
PackageLicenseDeclared: Apache-2.0
File renamed without changes.

0 commit comments

Comments
 (0)