Skip to content

Commit e22f293

Browse files
madrobHT154
andauthored
Address potential template injection (#30)
Co-authored-by: Jen Basch <[email protected]>
1 parent a3d8ad5 commit e22f293

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/index.pkl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//===----------------------------------------------------------------------===//
2-
// Copyright © 2025 Apple Inc. and the Pkl project authors. All rights reserved.
2+
// Copyright © 2025-2026 Apple Inc. and the Pkl project authors. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -84,8 +84,11 @@ local publishJob: Workflow.Job = new {
8484
`if` = "inputs.source_run != null"
8585
run =
8686
"""
87-
echo "Triggered by workflow in repo: ${{ inputs.source_run }}" >> $GITHUB_STEP_SUMMARY
87+
echo "Triggered by workflow in repo: ${INPUTS_SOURCE_RUN}" >> $GITHUB_STEP_SUMMARY
8888
"""
89+
env {
90+
["INPUTS_SOURCE_RUN"] = "${{ inputs.source_run }}"
91+
}
8992
}
9093
(catalog.`actions/checkout@v6`) {
9194
with {

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
steps:
2727
- name: Triggered by
2828
if: inputs.source_run != null
29-
run: 'echo "Triggered by workflow in repo: ${{ inputs.source_run }}" >> $GITHUB_STEP_SUMMARY'
29+
env:
30+
INPUTS_SOURCE_RUN: ${{ inputs.source_run }}
31+
run: 'echo "Triggered by workflow in repo: ${INPUTS_SOURCE_RUN}" >> $GITHUB_STEP_SUMMARY'
3032
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
3133
with:
3234
persist-credentials: false

0 commit comments

Comments
 (0)