Skip to content

Commit 44070f0

Browse files
mkolasinski-splunkkdoroszko-splunkmbruzda-splunk
authored
feat(release): 4.15.0 (#218)
Release notes: - refactor: semgrep job update #213 #213 - feat: Remove virustotal #217 - fix: ADDON-67588 internal repo installation #215 --------- Co-authored-by: kdoroszko-splunk <kdoroszko@splunk.com> Co-authored-by: kdoroszko-splunk <147069837+kdoroszko-splunk@users.noreply.github.com> Co-authored-by: Marcin Bruzda <94437843+mbruzda-splunk@users.noreply.github.com>
1 parent 7e6a5a9 commit 44070f0

File tree

4 files changed

+19
-47
lines changed

4 files changed

+19
-47
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ on:
2424
AWS_SECRET_ACCESS_KEY:
2525
description: AWS secret access key
2626
required: true
27-
VT_API_KEY:
28-
description: Virustotal api key
29-
required: true
3027
OTHER_TA_REQUIRED_CONFIGS:
3128
description: other required configs
3229
required: true
@@ -369,14 +366,16 @@ jobs:
369366
name: security-sast-semgrep
370367
needs:
371368
- setup-workflow
372-
if: ${{ needs.setup-workflow.outputs.skip-workflow != 'Yes' && github.actor != 'dependabot[bot]' }}
369+
container:
370+
image: returntocorp/semgrep
371+
if: ${{ needs.setup-workflow.outputs.skip-workflow != 'Yes' }}
373372
steps:
374373
- uses: actions/checkout@v3
375374
- name: Semgrep
376375
id: semgrep
377-
uses: semgrep/semgrep-action@v1
378-
with:
379-
publishToken: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}
376+
run: semgrep ci
377+
env:
378+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_PUBLISH_TOKEN }}
380379

381380
test-inventory:
382381
runs-on: ubuntu-latest
@@ -441,6 +440,7 @@ jobs:
441440
poetry export --without-hashes --dev -o requirements_dev.txt
442441
fi
443442
if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi
443+
git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
444444
pip install -r requirements_dev.txt
445445
- name: Create directories
446446
run: |
@@ -489,6 +489,7 @@ jobs:
489489
poetry export --without-hashes --dev -o requirements_dev.txt
490490
fi
491491
if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi
492+
git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
492493
pip install -r requirements_dev.txt
493494
- name: Create directories
494495
run: |
@@ -569,7 +570,9 @@ jobs:
569570
${{ runner.os }}-pip-
570571
- name: Install deps
571572
if: ${{ steps.checklibs.outputs.ENABLED == 'true' }}
572-
run: pip install -r requirements_dev.txt
573+
run: |
574+
git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
575+
pip install -r requirements_dev.txt
573576
- name: Semantic Release Get Next
574577
id: semantic
575578
if: github.event_name != 'pull_request'
@@ -699,7 +702,9 @@ jobs:
699702
key: ${{ runner.os }}-pip-python3_9-${{ hashFiles('requirements_dev.txt') }}
700703
restore-keys: |
701704
${{ runner.os }}-pip-python3_9
702-
- run: pip install -r requirements_dev.txt
705+
- run: |
706+
git config --global url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
707+
pip install -r requirements_dev.txt
703708
- id: semantic
704709
if: github.event_name != 'pull_request'
705710
uses: splunk/semantic-release-action@v1.3
@@ -721,24 +726,6 @@ jobs:
721726
with:
722727
version: ${{ steps.BuildVersion.outputs.VERSION }}
723728

724-
security-virustotal:
725-
continue-on-error: true
726-
name: security-virustotal
727-
needs: build
728-
if: ${{ !cancelled() && needs.build.result == 'success' }}
729-
runs-on: ubuntu-latest
730-
steps:
731-
- uses: actions/download-artifact@v3
732-
with:
733-
name: package-splunkbase
734-
path: build/package/
735-
- name: VirusTotal Scan
736-
uses: crazy-max/ghaction-virustotal@v4
737-
with:
738-
vt_api_key: ${{ secrets.VT_API_KEY }}
739-
files: |
740-
build/package/*
741-
742729
run-requirements-unit-tests:
743730
runs-on: ubuntu-latest
744731
needs:
@@ -848,9 +835,9 @@ jobs:
848835
artifact-registry:
849836
runs-on: ubuntu-latest
850837
needs:
851-
- security-virustotal
852838
- meta
853-
if: ${{ !cancelled() && needs.security-virustotal.result == 'success' && needs.meta.result == 'success' }}
839+
- build
840+
if: ${{ !cancelled() && needs.build.result == 'success' && needs.meta.result == 'success' }}
854841
outputs:
855842
artifact: ${{ steps.artifactid.outputs.result }}
856843
permissions:
@@ -2682,7 +2669,6 @@ jobs:
26822669
- review_secrets
26832670
- semgrep
26842671
- build
2685-
- security-virustotal
26862672
- test-inventory
26872673
- run-unit-tests
26882674
- appinspect

README.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ security-sast-semgrep
213213
**Description:**
214214

215215
- Semgrep CI behaves like other static analysis and linting tools: it runs a set of user-configured rules and returns a non-zero exit code if there are findings, resulting in its job showing a ✅ or ❌.
216-
217-
**Action used:** https://github.com/returntocorp/semgrep-action
218-
216+
- Semgrep can do two scan types:
217+
- diff-aware scan, performed while workflow triggering event is pull request and scans only changes in files, which keeps the scan fast and reduces finding duplication.
218+
- full scan, performed while workflow triggering event is other event (e.g. push) and scans the whole codebase.
219219

220220
**Pass/fail behaviour**
221221

@@ -299,20 +299,6 @@ installation-update.json
299299
```
300300
- package-splunkbase includes Splunkbase equivalent package code
301301

302-
security-virustotal
303-
=======================
304-
305-
**Description**
306-
307-
GitHub Action to upload and scan files with VirusTotal which analyze files, domains, IPs and URLs to detect malware, suspicions and other breaches
308-
309-
**Action used** https://github.com/crazy-max/ghaction-virustotal
310-
311-
**Artifacts:**
312-
313-
- No Artifacts for this stage. Report link is available in the logs
314-
- <img src="images/virus-total/stage.png" alt="stage" style="width:200px;"/> <img src="images/virus-total/platform.png" alt="platform" style="width:200px;"/>
315-
316302

317303
AppInspect
318304
=======================

images/virus-total/platform.png

-528 KB
Binary file not shown.

images/virus-total/stage.png

-659 KB
Binary file not shown.

0 commit comments

Comments
 (0)