|
| 1 | +name: RL Scanner |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +permissions: |
| 7 | + id-token: write |
| 8 | + contents: read |
| 9 | + |
| 10 | +jobs: |
| 11 | + rl-scan: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + environment: release |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Checkout code |
| 17 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 18 | + with: |
| 19 | + persist-credentials: false |
| 20 | + |
| 21 | + - name: Setup Node.js |
| 22 | + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 |
| 23 | + with: |
| 24 | + node-version: '24' |
| 25 | + |
| 26 | + - name: Install dependencies |
| 27 | + run: npm ci |
| 28 | + |
| 29 | + - name: Pack artifact |
| 30 | + id: artifact |
| 31 | + run: | |
| 32 | + ARTIFACT=$(npm pack --ignore-scripts | tail -1) |
| 33 | + VERSION=$(node -p "require('./package.json').version") |
| 34 | + echo "filename=$ARTIFACT" >> $GITHUB_OUTPUT |
| 35 | + echo "version=$VERSION" >> $GITHUB_OUTPUT |
| 36 | +
|
| 37 | + - name: Set up Python |
| 38 | + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 |
| 39 | + with: |
| 40 | + python-version: "3.10" |
| 41 | + |
| 42 | + - name: Configure AWS credentials |
| 43 | + uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0 |
| 44 | + with: |
| 45 | + role-to-assume: ${{ secrets.PRODSEC_TOOLS_ARN }} |
| 46 | + aws-region: us-east-1 |
| 47 | + mask-aws-account-id: true |
| 48 | + |
| 49 | + - name: Install rl-wrapper |
| 50 | + env: |
| 51 | + WRAPPER_INDEX_URL: "https://${{ secrets.PRODSEC_TOOLS_USER }}:${{ secrets.PRODSEC_TOOLS_TOKEN }}@a0us.jfrog.io/artifactory/api/pypi/python-local/simple" |
| 52 | + run: pip install "rl-wrapper>=1.0.0" --index-url $WRAPPER_INDEX_URL |
| 53 | + |
| 54 | + - name: Run ReversingLabs Scanner |
| 55 | + env: |
| 56 | + RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }} |
| 57 | + RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }} |
| 58 | + SIGNAL_HANDLER_TOKEN: ${{ secrets.SIGNAL_HANDLER_TOKEN }} |
| 59 | + PYTHONUNBUFFERED: 1 |
| 60 | + run: | |
| 61 | + rl-wrapper \ |
| 62 | + --artifact "${{ steps.artifact.outputs.filename }}" \ |
| 63 | + --name node-xml-encryption \ |
| 64 | + --version "${{ steps.artifact.outputs.version }}" \ |
| 65 | + --repository "${{ github.repository }}" \ |
| 66 | + --commit "${{ github.sha }}" \ |
| 67 | + --build-env "github_actions" \ |
| 68 | + --suppress_output |
0 commit comments