Skip to content

Commit 4c8fb53

Browse files
chore: migrate RL scanner to shared devsecops-tooling action
## Changes - Replace local `rl-scanner` composite action and reusable workflow with the shared `auth0/devsecops-tooling/.github/actions/rl-scan@main` action, matching `auth0-fastapi-api` - Inline RL scanner job directly in `publish.yml` - Use absolute artifact path via `github.workspace` - Add `SIGNAL_HANDLER_DOMAIN` and `PRODSEC_PYTHON_TOOLS_REPO` secrets - Add `needs: rl-scanner` dependency on `publish-pypi` job - Remove `.github/workflows/rl-scanner.yml` - Remove `.github/actions/rl-scanner/`
1 parent cca3b25 commit 4c8fb53

3 files changed

Lines changed: 49 additions & 167 deletions

File tree

.github/actions/rl-scanner/action.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Publish Release
22

33
on:
4+
push:
5+
branches:
6+
- chore/migrate-rl-scanner # TEMPORARY: remove after RL scanner debugging
47
workflow_dispatch:
58

69
### TODO: Replace instances of './.github/actions/' with reference to the `dx-sdk-actions` repo is made public and this file is transferred over
@@ -12,22 +15,55 @@ permissions:
1215

1316
jobs:
1417
rl-scanner:
15-
uses: ./.github/workflows/rl-scanner.yml
16-
with:
17-
python-version: "3.10"
18-
artifact-name: "auth0-fastapi-api.tgz"
19-
secrets:
20-
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
21-
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
22-
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
23-
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
24-
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
25-
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
18+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
24+
fetch-tags: true
25+
26+
- name: Configure Python
27+
uses: actions/setup-python@v6
28+
with:
29+
python-version: "3.12"
30+
31+
- name: Build artifact
32+
run: |
33+
pip install --user --upgrade pip
34+
pip install --user pipx
35+
pipx ensurepath
36+
pipx install poetry
37+
poetry config virtualenvs.in-project true
38+
poetry install --with dev
39+
poetry build
40+
tar -czvf auth0-api-python.tgz *
41+
42+
- name: Get version
43+
id: get_version
44+
uses: ./.github/actions/get-version
45+
46+
- name: Run RL Scanner
47+
uses: auth0/devsecops-tooling/.github/actions/rl-scan@main
48+
with:
49+
artifact-name: "auth0-api-python"
50+
artifact-path: "${{ github.workspace }}/auth0-api-python.tgz"
51+
version: ${{ steps.get_version.outputs.version }}
52+
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
53+
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
54+
SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }}
55+
SIGNAL_HANDLER_DOMAIN: ${{ secrets.SIGNAL_HANDLER_DOMAIN }}
56+
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
57+
PRODSEC_TOOLS_USER: ${{ secrets.PRODSEC_TOOLS_USER }}
58+
PRODSEC_TOOLS_TOKEN: ${{ secrets.PRODSEC_TOOLS_TOKEN }}
59+
PRODSEC_PYTHON_TOOLS_REPO: ${{ secrets.PRODSEC_PYTHON_TOOLS_REPO }}
60+
2661
publish-pypi:
27-
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
62+
if: false # TEMPORARY: disabled during RL scanner debugging — original condition below
63+
# if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
2864
name: "PyPI"
2965
runs-on: ubuntu-latest
30-
# needs: rl-scanner
66+
needs: rl-scanner
3167
environment: release
3268

3369
steps:

.github/workflows/rl-scanner.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)