-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 2.43 KB
/
Copy pathmain.yml
File metadata and controls
62 lines (50 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on: [push]
jobs:
depchecktest:
runs-on: ubuntu-latest
name: Dependency Check Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Java
uses: actions/setup-java@v2
with:
java-version: '11'
java-package: 'jdk'
distribution: 'adopt'
architecture: 'x64'
check-latest: false
server-id: 'github'
server-username: ${{ github.actor }}
server-password: ${{ secrets.GITHUB_TOKEN }}
overwrite-settings: true
job-status: 'success'
- name: Download OWASP Dependency-Check
run: |
VERSION=$(curl -s https://jeremylong.github.io/DependencyCheck/current.txt)
curl -Ls "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip
unzip dependency-check.zip
ls -la
pwd
- name: Copy Project Directory
run: |
cp -r /home/runner/work/iOS/iOS /tmp/iOS
rm -rf /tmp/iOS/dependency-check
rm -f /tmp/iOS/dependency-check.zip
- name: Run Dependency-Check
run: |
cd dependency-check/bin
bash dependency-check.sh --scan /tmp/iOS --format HTML --out reports --enableRetired --enableExperimental --project "property.analyzer.ios.enabled=true"
- name: List files in reports directory also add the logo with heading
run: |
ls -la dependency-check/bin/reports
cd dependency-check/bin/reports
chmod 777 dependency-check-report.html
sed '/<svg/,/<\/svg>/d' dependency-check-report.html > temp.html && mv temp.html dependency-check-report.html
{ echo '<div style="text-align:center"><img src="https://storage.googleapis.com/tm-assets/images/dark/teachmint-logo-dark.svg" width="200" height="50" /></div>'; cat dependency-check-report.html; } > tmp_report_html.html && mv tmp_report_html.html dependency-check-report.html
sed 's|<h2 class="">Project: property\.analyzer\.python\.enabled=true</h2>|<h2 class="">Dependency Vulnerability Analysis</h2>|' dependency-check-report.html > temp.html && mv temp.html dependency-check-report.html
- name: Upload Test results
uses: actions/upload-artifact@v2
with:
name: Dependency-Check Report
path: dependency-check/bin/reports