Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Why Your GitHub Actions Secrets Don't Work in Reusable Workflow Inputs

We recently migrated our Docker build workflows to use a shared reusable workflow. The migration looked straightforward: extract the build steps, parameterize the inputs, and call the shared workflow with secrets: inherit. CI immediately…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

We recently migrated our Docker build workflows to use a shared reusable workflow. The migration looked straightforward: extract the build steps, parameterize the inputs, and call the shared workflow with secrets: inherit. CI immediately broke.




Invalid workflow file (Line: 15, Col: 19):
Unrecognized named-value: 'secrets'






The fix took 20 minutes. Understanding why took longer, and every answer led to another "but wait" question.






The Setup



The calling workflow passed a Rails master key as a build arg:




jobs:
build:
uses: our-org/shared/.github/workflows/build-image.yml@main
secrets: inherit
with:
build_args: |
RAILS_MASTER_KEY=${{ secrets.RAILS_MASTER_KEY }}






This fails at parse time. GitHub validates the workflow file before anything runs and rejects secrets in that with: block.






Job-Level with: Is Not Step-Level with:



This is where it gets confusing, because with: appears in two very different places in a workflow file, and they have different rules.



Step-level with: passes inputs to an action. The secrets context is available here:




steps:
- uses: docker/build-push-action@v6
with:
build-args: RAILS_MASTER_KEY=${{ secrets.RAILS_MASTER_KEY }} # works






Job-level with: passes inputs to a reusable workflow. The secrets context is not available here:




jobs:
build:
uses: org/repo/.github/workflows/shared.yml@main
with:
build_args: ${{ secrets.RAILS_MASTER_KEY }} # fails






The contexts reference documents this in a table. For jobs.<job_id>.with.<with_id>, the allowed contexts are:




github, needs, strategy, matrix, inputs, vars




No secrets.






But the Docs Say Secrets Are Available "From Any Step in a Job"



The secrets context documentation says:




This context is the same for each job in a workflow run. You can access this context from any step in a job.




That's true, for steps. The job-level with: on a reusable workflow call is not a step. It's a job-level declaration that gets parsed and validated with a restricted set of contexts before any job runs.






But I Have secrets: inherit



The reusable workflows docs explain that secrets: inherit implicitly passes secrets to the called workflow. And it does. At runtime, the called workflow's steps can reference secrets.RAILS_MASTER_KEY directly.



The problem is that with: is evaluated on the caller side. secrets: inherit makes secrets available inside the called workflow, not in the caller's with: expression. These are two parallel channels:





  • with: sends named inputs (restricted contexts, validated at parse time)


  • secrets: sends secrets (available at runtime in the called workflow's steps)






But What About Org vs Repo Secrets?



Doesn't matter for this error. secrets: inherit passes both org-level and repo-level secrets to the called workflow. The error is a static validation failure at parse time. GitHub isn't even looking at which secrets exist or where they're stored. It's rejecting the secrets context in with: regardless.






The Fix



Pass the secret name as a string through with:. Resolve it inside the called workflow where secrets is available.



In the calling workflow:




with:
master_key_secret: RAILS_MASTER_KEY # plain string, no secrets context






In the shared workflow, add an input and resolve it in the build step:




on:
workflow_call:
inputs:
master_key_secret:
description: "Secret name for Rails master key (empty to skip)"
required: false
type: string
default: ""

# In the build step:
build-args: |
${{ inputs.master_key_secret != '' && format('RAILS_MASTER_KEY={0}', secrets[inputs.master_key_secret]) || '' }}






The secrets[inputs.master_key_secret] pattern dynamically looks up a secret by name. It's the same approach GitHub's own docs use for parameterized registry credentials. The input defaults to empty, so repos that don't need it aren't affected.






The Takeaway



Two things that look the same in YAML, with: on a step and with: on a reusable workflow call, have fundamentally different context availability. If you're migrating from inline steps to reusable workflows and your secrets.* references break, that's why. Pass the name, not the value.






References:



1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
1 Warnungen
title: Detect Exploitation - Why Your GitHub Actions Secrets Don't Work in Reusable Workflow Inputs
id: 4b5a4617-05f0-410e-90ce-d84a3c02debd
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-27
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-27"
        description = "YARA Signature for "
    strings:
        $str = "Why Your GitHub Actions Secret" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("Why Your GitHub Actions Secrets Dont Wor")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*Why Your GitHub Actions Secrets Dont Wor*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "Why Your GitHub Actions Secrets Dont Wor"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Analyse für identifizierte Bedrohung auf Basis von Live-CTI (ENISA EUVD): CVSS 0.0 · EPSS 0.0% · CISA KEV: nein. Handlungsableitung aus den verlinkten Hersteller-Quellen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Why Your GitHub Actions Secrets Don't Work in Reusable Workflow Inputs

Thematisch verwandte Begriffe: Your, GitHub, Actions, Secrets · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-100739 | A vulnerability was detected in mathurvishal CloudClassroom-PHP-Project…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag