1+ name : RL-Secure
2+ run-name : rl-scanner
3+
4+ on :
5+ merge_group :
6+ workflow_dispatch :
7+ push :
8+ branches : ["master"]
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+ fetch-depth : 0
30+ ref : ${{ github.event.inputs.branch }}
31+
32+ - name : Configure Ruby
33+ uses : ./.github/actions/setup
34+ with :
35+ ruby-version : 3.2
36+
37+ - name : Build RubyGems
38+ shell : bash
39+ run : |
40+ gem build *.gemspec
41+
42+ - name : Get Artifact Version
43+ id : get_version
44+ run : echo "::set-output name=version::$(cat .version)"
45+
46+ - name : Output build artifact
47+ id : output_build_artifact
48+ run : |
49+ echo "scanfile=$(ls *.gem)" >> $GITHUB_OUTPUT
50+
51+ - name : Set up Python
52+ uses : actions/setup-python@v4
53+ with :
54+ python-version : " 3.10"
55+
56+ - name : Install Python dependencies
57+ run : |
58+ pip install --upgrade pip
59+ pip install boto3 requests
60+
61+ - name : Configure AWS credentials
62+ uses : aws-actions/configure-aws-credentials@v1
63+ with :
64+ role-to-assume : ${{ secrets.PRODSEC_TOOLS_ARN }}
65+ aws-region : us-east-1
66+ mask-aws-account-id : true
67+
68+ - name : Run Reversing Labs Wrapper Scanner
69+ env :
70+ RLSECURE_LICENSE : ${{ secrets.RLSECURE_LICENSE }}
71+ RLSECURE_SITE_KEY : ${{ secrets.RLSECURE_SITE_KEY }}
72+ SIGNAL_HANDLER_TOKEN : ${{ secrets.SIGNAL_HANDLER_TOKEN }}
73+ WRAPPER_INDEX_URL : " https://${{ secrets.PRODSEC_TOOLS_USER }}:${{ secrets.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple"
74+ PYTHONUNBUFFERED : 1
75+ run : |
76+ pip install rl-wrapper --index-url "$WRAPPER_INDEX_URL" && \
77+ rl-wrapper \
78+ --artifact "${{ steps.output_build_artifact.outputs.scanfile }}" \
79+ --version "${{ steps.get_version.outputs.version }}" \
80+ --name "${{ github.event.repository.name }}" \
81+ --repository "${{ github.repository }}" \
82+ --commit "${{ github.sha }}" \
83+ --build-env "github_actions" \
84+ --suppress_output
85+ continue-on-error : true
0 commit comments