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
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CodeQL

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * 1"

jobs:
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language:
- rust
- actions

permissions:
contents: read
security-events: write
Comment thread
raphael-theriault-swi marked this conversation as resolved.

steps:
- uses: actions/checkout@v6

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}

- uses: actions-rust-lang/setup-rust-toolchain@v1
if: matrix.language == 'rust'
- run: cargo build
if: matrix.language == 'rust'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
50 changes: 48 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
name: Release
on:
workflow_dispatch:
inputs:
publish:
description: Publish to AWS and GHCR
required: true
default: true
type: boolean
scan:
description: Run RL scanning
required: true
default: true
type: boolean

jobs:
build:
Expand Down Expand Up @@ -48,6 +59,7 @@ jobs:

prod:
needs: build
if: inputs.publish
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -103,7 +115,7 @@ jobs:

docker:
needs: build
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
if: inputs.publish
strategy:
matrix:
arch: [x86_64, aarch64]
Expand Down Expand Up @@ -138,8 +150,8 @@ jobs:
needs:
- build
- docker
if: inputs.publish
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'

permissions:
contents: read
Expand Down Expand Up @@ -167,3 +179,37 @@ jobs:
--tag ghcr.io/${{ github.repository }}:$PATCH \
ghcr.io/${{ github.repository }}:x86_64$SUFFIX \
ghcr.io/${{ github.repository }}:aarch64$SUFFIX

scan:
needs: build
if: inputs.scan
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
name: diet-lambda-x86_64
path: x86_64
- uses: actions/download-artifact@v8
with:
name: diet-lambda-aarch64
path: aarch64

- run: ls -AR
- run: zip -r diet-lambda.zip src x86_64 aarch64 Cargo.toml Cargo.lock .cargo LICENSE

- name: RL Scan
run: |
docker run --rm -v "${{ github.workspace }}:/workspace" \
-e RLPORTAL_ACCESS_TOKEN="${{ secrets.RLPORTAL_ACCESS_TOKEN }}" \
reversinglabs/rl-scanner-cloud rl-scan \
--rl-portal-server solarwinds \
--rl-portal-org SolarWinds \
--rl-portal-group SaaS-Agents-SWO \
--purl diet-lambda/diet-lambda@${{ needs.build.outputs.version }} \
--file-path /workspace/diet-lambda.zip \
--submit-only --replace