1+ name : RL-Secure
2+ run-name : rl-scanner
3+
4+ on :
5+ merge_group :
6+ workflow_dispatch :
7+ push :
8+ branches : ["main"]
9+ pull_request :
10+ types :
11+ - opened
12+ - synchronize
13+
14+ jobs :
15+ rl-scanner :
16+ if : github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request')
17+ runs-on : ubuntu-latest
18+
19+ environment : security
20+
21+ permissions :
22+ pull-requests : write
23+ id-token : write # This is required for requesting the JWT
24+
25+ steps :
26+ - name : Checkout code
27+ uses : actions/checkout@v4
28+ with :
29+ ref : ${{ github.event.pull_request.head.sha || github.sha || github.ref }}
30+
31+ - name : Setup PHP
32+ uses :
shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # [email protected] 33+ with :
34+ php-version : 8.1
35+
36+ - name : Install dependencies
37+ shell : bash
38+ run : |
39+ composer install --prefer-dist
40+
41+ - name : Build PHP Package
42+ shell : bash
43+ run : |
44+ zip -r auth0-php-package.zip src composer.json README.md LICENSE.txt
45+
46+ - name : Get Artifact Version
47+ id : get_version
48+ run : |
49+ version=$(cat .version)
50+ echo "version=$version" >> $GITHUB_OUTPUT
51+
52+ - name : Output build artifact
53+ id : output_build_artifact
54+ run : |
55+ echo "scanfile=$(ls auth0-php-package.zip)" >> $GITHUB_OUTPUT
56+
57+ - name : Set up Python
58+ uses : actions/setup-python@v4
59+ with :
60+ python-version : " 3.10"
61+
62+ - name : Install Python dependencies
63+ run : |
64+ pip install --upgrade pip
65+ pip install boto3 requests
66+
67+ - name : Configure AWS credentials
68+ uses : aws-actions/configure-aws-credentials@v1
69+ with :
70+ role-to-assume : ${{ secrets.PRODSEC_TOOLS_ARN }}
71+ aws-region : us-east-1
72+ mask-aws-account-id : true
73+
74+ - name : Run Reversing Labs Wrapper Scanner
75+ env :
76+ RLSECURE_LICENSE : ${{ secrets.RLSECURE_LICENSE }}
77+ RLSECURE_SITE_KEY : ${{ secrets.RLSECURE_SITE_KEY }}
78+ SIGNAL_HANDLER_TOKEN : ${{ secrets.SIGNAL_HANDLER_TOKEN }}
79+ WRAPPER_INDEX_URL : " https://${{ secrets.PRODSEC_TOOLS_USER }}:${{ secrets.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple"
80+ PYTHONUNBUFFERED : 1
81+ run : |
82+ pip install rl-wrapper --index-url "$WRAPPER_INDEX_URL" && \
83+ rl-wrapper \
84+ --artifact "${{ steps.output_build_artifact.outputs.scanfile }}" \
85+ --version "${{ steps.get_version.outputs.version }}" \
86+ --name "${{ github.event.repository.name }}" \
87+ --repository "${{ github.repository }}" \
88+ --commit "${{ github.sha }}" \
89+ --build-env "github_actions" \
90+ --suppress_output
91+ continue-on-error : true
0 commit comments