File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,12 @@ const REPO = process.env.REPO || process.env.GITHUB_REPOSITORY || '';
112112let DRY_RUN = normaliseDryRun ( process . env . DRY_RUN || '1' ) ;
113113let PR_NUMBER = process . env . PR_NUMBER || '' ;
114114
115+ // Validate workflow name contains only safe characters
116+ if ( FAILED_WORKFLOW_NAME && ! / ^ [ \w \s \- \. ] + $ / . test ( FAILED_WORKFLOW_NAME ) ) {
117+ console . error ( `ERROR: FAILED_WORKFLOW_NAME contains invalid characters: ${ FAILED_WORKFLOW_NAME } ` ) ;
118+ process . exit ( 1 ) ;
119+ }
120+
115121// Set GH_TOKEN environment variable for gh CLI
116122if ( GH_TOKEN ) {
117123 process . env . GH_TOKEN = GH_TOKEN ;
@@ -335,4 +341,4 @@ if (DRY_RUN === 1) {
335341console . log ( '------------------------------------------------------------' ) ;
336342console . log ( ' Workflow Failure Notifier Complete' ) ;
337343console . log ( ` DRY_RUN: ${ DRY_RUN } ` ) ;
338- console . log ( '------------------------------------------------------------' ) ;
344+ console . log ( '------------------------------------------------------------' ) ;
Original file line number Diff line number Diff line change @@ -35,18 +35,18 @@ jobs:
3535 DRY_RUN : ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.dry_run == 'true' && '1' || '0') || '0' }}
3636 steps :
3737 - name : Harden the runner (Audit all outbound calls)
38- uses : step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
38+ uses : step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
3939 with :
4040 egress-policy : audit
4141
4242 - name : Checkout repository
4343 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4444
4545 - name : Setup Node.js
46- uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2 .0
46+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4 .0
4747 with :
4848 node-version : ' 20'
49-
49+
5050 - name : Notify PR of workflow failure
5151 if : github.event_name != 'workflow_dispatch' || github.event.inputs.failed_run_id != ''
5252 env :
You can’t perform that action at this time.
0 commit comments