Skip to content
Open
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
69 changes: 69 additions & 0 deletions .github/workflows/scan-private-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Private Security Scan

# Epyon private-repo scanner entrypoint.
# This workflow delegates execution to the local reusable workflow.
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header comment says this delegates to a "local reusable workflow", but the job actually calls a reusable workflow in the external MetroStar/epyon repository. Please update the comment to accurately describe where the workflow is sourced from (or switch to a local reusable workflow if that was the intent).

Suggested change
# This workflow delegates execution to the local reusable workflow.
# This workflow delegates execution to the reusable workflow in the MetroStar/epyon repository.

Copilot uses AI. Check for mistakes.

permissions:
contents: read

concurrency:
group: epyon-scan-${{ github.repository }}
cancel-in-progress: false

on:
schedule:
# Nightly run at 2 AM UTC
- cron: "0 2 * * *"
# checkov:skip=CKV_GHA_7:Workflow inputs control scan parameters not build artifacts
workflow_dispatch:
inputs:
subdirectory:
description: "Optional: Subdirectory path to scan (e.g., apps/api)"
required: false
type: string
scan_mode:
description: "Scan mode (quick/full/nightly/baseline)"
required: false
default: "full"
type: choice
options:
- quick
- full
- nightly
- baseline
garak_target_type:
description: "Garak generator type (e.g. test, openai, huggingface)"
required: false
default: "openai"
type: string
garak_target_name:
description: "Garak target model name (e.g. gpt-4o-mini)"
required: false
default: "gpt-4o-mini"
type: string
garak_probes:
description: "Garak probe set (comma-separated, e.g. promptinject,dan,encoding)"
required: false
default: "promptinject"
type: string

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
security-scan-main:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
permissions:
contents: read
actions: read
pull-requests: write
security-events: write
issues: write
uses: MetroStar/epyon/.github/workflows/epyon-scan.yml@main
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reusable workflow is referenced with @main, which is mutable. For supply-chain safety, pin reusable workflow calls to an immutable ref (a tag or, preferably, a full commit SHA) so a change upstream can’t silently alter what runs in this repository.

Suggested change
uses: MetroStar/epyon/.github/workflows/epyon-scan.yml@main
uses: MetroStar/epyon/.github/workflows/epyon-scan.yml@v1

Copilot uses AI. Check for mistakes.
with:
scan_mode: ${{ github.event_name == 'schedule' && 'nightly' || github.event.inputs.scan_mode || 'full' }}
subdirectory: ${{ github.event.inputs.subdirectory || '' }}
garak_target_type: ${{ github.event.inputs.garak_target_type || 'openai' }}
garak_target_name: ${{ github.event.inputs.garak_target_name || 'gpt-4o-mini' }}
garak_probes: ${{ github.event.inputs.garak_probes || 'promptinject' }}
secrets: inherit
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

secrets: inherit passes all repository/environment secrets to the called workflow in another repo. To reduce blast radius if the upstream workflow is ever compromised (or misbehaves), pass only the specific secrets the scan needs (and keep the reusable workflow ref pinned to an immutable SHA).

Suggested change
secrets: inherit
secrets:
EPYON_SCAN_TOKEN: ${{ secrets.EPYON_SCAN_TOKEN }}

Copilot uses AI. Check for mistakes.
Loading