Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2556b8f
added outdated scanner tracker github workflow (draft)
Ilyesbdlala Oct 7, 2021
f619edb
Added scanner matrix to version tracker workflow
Ilyesbdlala Oct 7, 2021
a090136
Added an extra step to fetch version API
Ilyesbdlala Oct 7, 2021
745b19f
Fix version comparison in version-tracker workflow
Ilyesbdlala Oct 7, 2021
ad9162b
Added scanners with github releases to version tracking
Ilyesbdlala Oct 7, 2021
1c5decb
Updating Helm Docs
Ilyesbdlala Oct 7, 2021
1d342a6
Added typo3scan to list of version-tracked scanners
Ilyesbdlala Oct 7, 2021
dcd10d6
Added angularjs-csti-scanner and gitleaks to list of version-tracked …
Ilyesbdlala Oct 7, 2021
6b31adb
Updating Helm Docs
Ilyesbdlala Oct 7, 2021
6509555
Fixed Kube-hunter version
Ilyesbdlala Oct 8, 2021
d581073
Updating Helm Docs
Ilyesbdlala Oct 8, 2021
c216823
Fixed small issue when comparing versions
Ilyesbdlala Oct 11, 2021
84cef18
Added checkign if PR already exists to version tracking
Ilyesbdlala Oct 11, 2021
c49b85e
Fixed wrong syntax in checking if PR exists
Ilyesbdlala Oct 11, 2021
31a3ca7
Fix typo in workflow of version tracker
Ilyesbdlala Oct 11, 2021
8a72a28
Fixed multiline run step in workflow
Ilyesbdlala Oct 11, 2021
9cba648
Merge branch 'main' into feature/scanner-version-tracker
Ilyesbdlala Oct 11, 2021
80ab764
Fix CI in version tracker and remove wrong link to typo3scan
Ilyesbdlala Oct 11, 2021
5b7b119
Workflow now updates appVersion if outdated
Ilyesbdlala Oct 11, 2021
613607b
Updating Helm Docs
Ilyesbdlala Oct 11, 2021
f81902b
Fixed small typo in PR name in version tracker
Ilyesbdlala Oct 11, 2021
82228a7
Use github cli instead of curl to fetch pull requests
Ilyesbdlala Oct 12, 2021
a134179
Added github cli auth login
Ilyesbdlala Oct 12, 2021
b6be74b
Added Github token to gh cli login
Ilyesbdlala Oct 12, 2021
aa93926
Github token is now set through standard input
Ilyesbdlala Oct 12, 2021
32ae5f1
Added quotes to pr name in workflow
Ilyesbdlala Oct 12, 2021
d63c4a1
Test for github enivronment variable
Ilyesbdlala Oct 12, 2021
32081a7
Removes syntax typo
Ilyesbdlala Oct 12, 2021
05fb432
changed environment variable to fix empty string
Ilyesbdlala Oct 12, 2021
4f366a4
Testing if grep variable is set
Ilyesbdlala Oct 12, 2021
c5cb74a
Merge branch 'main' into feature/scanner-version-tracker
Ilyesbdlala Oct 12, 2021
3c2fcfe
creating an intermediary variable for PR name in workflow
Ilyesbdlala Oct 12, 2021
61c7ef4
Fixed yq bad expression in updating appVersion
Ilyesbdlala Oct 12, 2021
a2edd44
Adde PullRequestTitle to workflow
Ilyesbdlala Oct 12, 2021
3147b05
Added PullRequest functionality to workflow
Ilyesbdlala Oct 13, 2021
c5ce900
Added cronjob to workflow
Ilyesbdlala Oct 13, 2021
4675ce7
Applied changes from code review
Ilyesbdlala Oct 14, 2021
2fff098
Removed the on push trigger
Ilyesbdlala Oct 14, 2021
3b8f4bb
Set PR base to main branch in version tracker
Ilyesbdlala Oct 14, 2021
4884aec
Readded the push trigger for testing
Ilyesbdlala Oct 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/scb-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Check outdated scanners
on:
push:
schedule:
- cron: "15 9 * * *" # Daily at 9:15 (avoids the beginning of the hour congestion)
jobs:
version-compare:
runs-on: ubuntu-latest
strategy:
matrix:
scanner:
- amass # Scanner that needs to be updated
- angularjs-csti-scanner # Scanner that does not need to be updated
# - gitleaks
# - kube-hunter
# - kubeaudit
# - ncrack
# - nuclei
# - ssh-scan
# - sslyze
# - trivy
# - whatweb
# - wpscan
# - zap
# - zap-advanced
# These are commented out for the moment to avoid accidental multiple erroneous PRs
# missing scanners are : nmap, nikto, typo3scan
steps:
- uses: actions/checkout@v2

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_COMMITS_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_COMMITS_PASSPHRASE }}
git-user-signingkey: true
git-commit-gpgsign: true

- name: Fetch scanner's version API
uses: mikefarah/yq@v4.4.1
with:
cmd: echo versionApi=$(yq e .versionApi scanners/${{ matrix.scanner }}/Chart.yaml) >> $GITHUB_ENV

- name: Fetch latest release scanner version
run: echo release=$((curl -sL ${{env.versionApi}} ) | jq -r ".tag_name") | tr -d "v" >> $GITHUB_ENV

- name: Fetch local scanner version
uses: mikefarah/yq@v4.4.1
with:
cmd: echo local=$(yq e .appVersion scanners/${{ matrix.scanner }}/Chart.yaml) | tr -d "v" >> $GITHUB_ENV

- name: Check if scanner is outdated and if PR already exists
if: ${{ env.release != env.local }}
run: |
echo 'The ${{ matrix.scanner }} scanner is outdated. Current SCB version is ${{env.local}} and remote version is ${{env.release}}'

pullRequestTitle="[SCB-Bot] Upgraded ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}"
echo pullRequest=$pullRequestTitle >> $GITHUB_ENV

echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token
echo prExists=$(gh pr list --state open --limit 100 | grep -F "$pullRequestTitle" -c) >> $GITHUB_ENV

- name : Upgrade Scanner
if: ${{ env.release != env.local && env.prExists == 0 }}
uses: mikefarah/yq@v4.4.1
with:
# appVersion value in chart is replaced with release value. Empty lines are deleted in the process
cmd: yq e --inplace '.appVersion = "v${{env.release}}"' ./scanners/${{ matrix.scanner }}/Chart.yaml

- name : Create Pull Request
if: ${{ env.release != env.local && env.prExists == 0 }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
committer: secureCodeBoxBot <securecodebox@iteratec.com>
author: secureCodeBoxBot <securecodebox@iteratec.com>
title: ${{ env.pullRequest }}
body: "This is an automated Pull Request by the SCB-Bot. It upgrades ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}"
branch: "dependencies/upgrading-${{ matrix.scanner }}-to-${{env.release}}"
labels: dependencies,scanner
commit-message: "Upgrading ${{ matrix.scanner }} from ${{env.local}} to ${{env.release}}"
signoff: true
base: main
2 changes: 2 additions & 0 deletions scanners/amass/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "v3.14"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/OWASP/Amass/releases/latest

keywords:
- security
- amass
Expand Down
2 changes: 2 additions & 0 deletions scanners/angularjs-csti-scanner/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "3.0.6"
kubeVersion: ">=v1.11.0-0"

versionApi : https://api.github.com/repos/tijme/angularjs-csti-scanner/releases/latest

keywords:
- security
- acstis
Expand Down
4 changes: 3 additions & 1 deletion scanners/gitleaks/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ description: A Helm chart for the gitleaks repository scanner that integrates wi
type: application
# version - gets automatically set to the secureCodeBox release version when the helm charts gets published
version: v3.1.0-alpha1
appVersion: "v.7.6.1"
appVersion: "v7.6.1"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/zricethezav/gitleaks/releases/latest

keywords:
- security
- gitleaks
Expand Down
2 changes: 1 addition & 1 deletion scanners/gitleaks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Gitleaks"
category: "scanner"
type: "Repository"
state: "released"
appVersion: "v.7.6.1"
appVersion: "v7.6.1"
usecase: "Find potential secrets in repositories"
---

Expand Down
2 changes: 2 additions & 0 deletions scanners/kube-hunter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "0.6.1"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/aquasecurity/kube-hunter/releases/latest

keywords:
- security
- kube-hunter
Expand Down
2 changes: 2 additions & 0 deletions scanners/kubeaudit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ version: v3.1.0-alpha1
appVersion: "v0.14.2"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/Shopify/kubeaudit/releases/latest

keywords:
- security
- kubeaudit
Expand Down
2 changes: 2 additions & 0 deletions scanners/ncrack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "0.7"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/nmap/ncrack/releases/latest

keywords:
- security
- ncrack
Expand Down
2 changes: 2 additions & 0 deletions scanners/nuclei/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "v2.5.2"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/projectdiscovery/nuclei/releases/latest

keywords:
- security
- nuclei
Expand Down
2 changes: 2 additions & 0 deletions scanners/ssh-scan/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "0.0.44"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/mozilla/ssh_scan/releases/latest

keywords:
- security
- ssh
Expand Down
2 changes: 2 additions & 0 deletions scanners/sslyze/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "v4.0.4"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/nabla-c0d3/sslyze/releases/latest

keywords:
- security
- ssl
Expand Down
2 changes: 2 additions & 0 deletions scanners/trivy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "0.19.2"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/aquasecurity/trivy/releases/latest

keywords:
- security
- trivy
Expand Down
2 changes: 2 additions & 0 deletions scanners/whatweb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "v0.5.5"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/urbanadventurer/WhatWeb/releases/latest

keywords:
- security
- whatweb
Expand Down
2 changes: 2 additions & 0 deletions scanners/wpscan/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "v3.8.19"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/wpscanteam/wpscan/releases/latest

keywords:
- security
- wpscan
Expand Down
2 changes: 2 additions & 0 deletions scanners/zap-advanced/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "2.10.0"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/zaproxy/zaproxy/releases/latest

keywords:
- security
- ZAP
Expand Down
2 changes: 2 additions & 0 deletions scanners/zap/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ version: v3.1.0-alpha1
appVersion: "2.10.0"
kubeVersion: ">=v1.11.0-0"

versionApi: https://api.github.com/repos/zaproxy/zaproxy/releases/latest

keywords:
- security
- Zap
Expand Down