Skip to content

chore: add orca #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2025
Merged
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
77 changes: 77 additions & 0 deletions .github/workflows/orca.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: SAST, SCA & Image Scan Workflow

on:
push:
branches: ["main"]
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
orca-scan:
name: Orca Scan
runs-on: ubuntu-latest
env:
PROJECT_KEY: observeinc-observe-agent
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Orca SAST Scan
uses: orcasecurity/shiftleft-sast-action@v1
with:
api_token: ${{ secrets.ORCA_SECURITY_API_TOKEN }}
project_key: ${{ env.PROJECT_KEY }}
path: "."

- name: Run Orca FS Scan
uses: orcasecurity/shiftleft-fs-action@v1
with:
api_token: ${{ secrets.ORCA_SECURITY_API_TOKEN }}
project_key: ${{ env.PROJECT_KEY }}
path: "."

orca-container-scan:
name: Orca Container Image Scan
runs-on: ubuntu-observe-agent-8cpu
permissions:
security-events: write
env:
PROJECT_KEY: observeinc-observe-agent
TEST_TAG: observeinc/observe-agent:test
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.8

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser-pro
version: 2.8.2
args: build --snapshot --id=linux_build --skip=validate --single-target
env:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

- name: Copy Binary
run: |
cp dist/linux_amd64/linux_build_linux_amd64_v1/observe-agent .

- name: Build Docker Image Locally
run: docker build -f packaging/docker/Dockerfile -t ${{ env.TEST_TAG }} .

- name: Run Orca Container Image Scan
uses: orcasecurity/shiftleft-container-image-action@v1
with:
api_token: ${{ secrets.ORCA_SECURITY_API_TOKEN }}
project_key: ${{ env.PROJECT_KEY }}
image: ${{ env.TEST_TAG }}
Loading