Skip to content

Commit 248e831

Browse files
fix: pass workflow inputs via env vars to prevent script injection
Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent e5262f4 commit 248e831

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/generate-connector-registries.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,19 @@ jobs:
5252
- name: Compile Registries
5353
env:
5454
GCS_CREDENTIALS: ${{ secrets.METADATA_SERVICE_PROD_GCS_CREDENTIALS }}
55+
INPUT_FORCE: ${{ inputs.force }}
56+
INPUT_CONNECTOR_NAME: ${{ inputs.connector-name }}
5557
shell: bash
5658
run: |
5759
COMPILE_ARGS="airbyte-ops registry store compile"
5860
COMPILE_ARGS="${COMPILE_ARGS} --store ${REGISTRY_STORE}"
5961
COMPILE_ARGS="${COMPILE_ARGS} --with-secrets-mask"
6062
COMPILE_ARGS="${COMPILE_ARGS} --with-legacy-migration v1"
61-
if [[ "${{ inputs.force }}" == "true" ]]; then
63+
if [[ "${INPUT_FORCE}" == "true" ]]; then
6264
COMPILE_ARGS="${COMPILE_ARGS} --force"
6365
fi
64-
if [[ -n "${{ inputs.connector-name }}" ]]; then
65-
IFS=',' read -ra CONNECTORS <<< "${{ inputs.connector-name }}"
66+
if [[ -n "${INPUT_CONNECTOR_NAME}" ]]; then
67+
IFS=',' read -ra CONNECTORS <<< "${INPUT_CONNECTOR_NAME}"
6668
for c in "${CONNECTORS[@]}"; do
6769
COMPILE_ARGS="${COMPILE_ARGS} --connector-name $(echo "$c" | xargs)"
6870
done

0 commit comments

Comments
 (0)