Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
29 changes: 1 addition & 28 deletions .github/workflows/_static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# Betterleaks scans git history across refs, so it needs the full
# history rather than the default shallow clone.
fetch-depth: 0

- name: Run Betterleaks
id: betterleaks
continue-on-error: true
# version 0.1.0
uses: dortort/betterleaks-action@cd0b905aa4befb8f42f8b1ab98150180c9e77515
with:
version: "v1.9.0"
report-path: betterleaks-report.sarif
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Betterleaks report
uses: actions/upload-artifact@v7
if: always()
with:
name: betterleaks-report
if-no-files-found: warn
path: ${{ steps.betterleaks.outputs.report-path }}

- name: Fail if Betterleaks found leaks
if: steps.betterleaks.outcome == 'failure'
run: |
echo "Betterleaks reported a failure in at least one scan."
exit 1

- name: Set up Python
uses: actions/setup-python@v7
Expand Down Expand Up @@ -73,6 +45,7 @@ jobs:

- name: Run all static analysis
env:
# betterleaks is run in a separate workflow
Comment thread
ianardee marked this conversation as resolved.
Resolved
SKIP: betterleaks,sphinx-html,sphinx-linkcheck
run: |
prek run --all-files
6 changes: 5 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ permissions:
jobs:
workflow-lint:
uses: mindee/client-lib-actions/.github/workflows/workflow-lint.yml@main
betterleaks:
uses: mindee/client-lib-actions/.github/workflows/betterleaks.yml@main
needs: workflow-lint
secrets: inherit
static-analysis:
uses: ./.github/workflows/_static-analysis.yml
needs: workflow-lint
test-units:
uses: ./.github/workflows/_test-units.yml
needs: static-analysis
needs: [ betterleaks, static-analysis ]
secrets: inherit
test-regressions:
uses: ./.github/workflows/_test-regressions.yml
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/push-main-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
- main

jobs:
betterleaks:
uses: mindee/client-lib-actions/.github/workflows/betterleaks.yml@main
secrets: inherit
static-analysis:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
uses: mindee/mindee-api-python/.github/workflows/_static-analysis.yml@main
test_units:
uses: mindee/mindee-api-python/.github/workflows/_test-units.yml@main
needs: static-analysis
uses: mindee/mindee-api-ruby/.github/workflows/_static-analysis.yml@main
test-units:
Comment on lines +13 to +14
uses: mindee/mindee-api-ruby/.github/workflows/_test-units.yml@main
needs: [ betterleaks, static-analysis ]
secrets: inherit
tag:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main
needs: test_units
needs: test-units
release:
uses: mindee/client-lib-actions/.github/workflows/create-release.yml@main
needs: tag
Expand Down
Loading