Skip to content
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

Adding Orca scanners #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
39 changes: 39 additions & 0 deletions .github/workflows/Orca-IAC-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sample Orca IaC Scan Workflow
on:
# Scan for each push event on your protected branch. If you have a different branch configured, please adjust the configuration accordingly by replacing 'main'.
push:
branches: ["main"]
# NOTE: To enable scanning for pull requests, uncomment the section below.
pull_request:
#branches: [ "main" ]
# NOTE: To schedule a daily scan at midnight, uncomment the section below.
schedule:
- cron: "0 0 * * *"
jobs:
orca-iac_scan:
name: Orca IaC Scan
runs-on: ubuntu-latest
env:
PROJECT_KEY: default # Set the desired project to run the cli scanning with
steps:
# Checkout your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v3

- name: Run Orca IaC Scan
uses: orcasecurity/shiftleft-iac-action@v1
with:
api_token: ${{ secrets.ORCA_SECURITY_API_TOKEN }}
format: "sarif"
output: "results/"
console_output: json
project_key: ${{ env.PROJECT_KEY }}
path:
# scanning directories: ./terraform/ ./sub-dir/ and a file: ./Dockerfile
"."

- uses: actions/upload-artifact@v3
if: always()
with:
name: orca-results
path: results/
36 changes: 36 additions & 0 deletions .github/workflows/Orca-image-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Sample Orca Container Image Scan Workflow
on:
# Scan for each push event on your protected branch. If you have a different branch configured, please adjust the configuration accordingly by replacing 'main'.
push:
branches: ["main"]
# NOTE: To enable scanning for pull requests, uncomment the section below.
pull_request:
#branches: [ "main" ]
# NOTE: To schedule a daily scan at midnight, uncomment the section below.
schedule:
- cron: "0 0 * * *"
jobs:
orca-container_scan:
name: Orca Container Image Scan
runs-on: ubuntu-latest
env:
PROJECT_KEY: default # Set the desired project to run the cli scanning with
steps:
# Checkout your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v3

- 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: <image to scan> #requires a hardcoded value here!!!
output: "results/"
console_output: json

- uses: actions/upload-artifact@v3
if: always()
with:
name: orca-results
path: results/
39 changes: 39 additions & 0 deletions .github/workflows/Orca-secrets-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Sample Orca FS Scan Workflow
on:
# Scan for each push event on your protected branch. If you have a different branch configured, please adjust the configuration accordingly by replacing 'main'.
push:
branches: ["main"]
# NOTE: To enable scanning for pull requests, uncomment the section below.
pull_request:
#branches: [ "main" ]
# NOTE: To schedule a daily scan at midnight, uncomment the section below.
schedule:
- cron: "0 0 * * *"
jobs:
orca-fs-scan:
name: Orca Secrets Scan
runs-on: ubuntu-latest
env:
PROJECT_KEY: default # Set the desired project to run the cli scanning with
steps:
# Checkout your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v3

- name: Run Orca FS Secret Scan
uses: orcasecurity/shiftleft-fs-action@v1
with:
api_token: ${{ secrets.ORCA_SECURITY_API_TOKEN }}
project_key: ${{ env.PROJECT_KEY }}
path:
# scanning the entire repository
"."
format: "sarif"
output: "results/"
console_output: json

- uses: actions/upload-artifact@v3
if: always()
with:
name: orca-results
path: results/