-
Notifications
You must be signed in to change notification settings - Fork 229
ci: opt in to allow-unsafe-pr-checkout for fork PR warehouse tests #2324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,6 +97,17 @@ jobs: | |
| with: | ||
| path: elementary | ||
| ref: ${{ inputs.elementary-ref }} | ||
| # Don't leave the base repo's token in the git config: the checked out | ||
| # code is fork-controlled (see below) and nothing here pushes. | ||
| persist-credentials: false | ||
| # Fork PRs are tested via pull_request_target intentionally: the | ||
| # integration tests need the CI secrets of our test warehouses, which | ||
| # a pull_request run of a fork cannot access. The caller | ||
| # (test-all-warehouses.yml) gates fork PRs behind the | ||
| # elementary_test_env environment, so a maintainer must approve the | ||
| # run before this fork code is checked out and executed, and only an | ||
| # explicit allowlist of secrets is passed in. | ||
| allow-unsafe-pr-checkout: true | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
curl -fsSL https://raw.githubusercontent.com/actions/checkout/v6/action.yml |
grep -A8 '^allow-unsafe-pr-checkout:'
actionlint .github/workflows/test-warehouse.ymlRepository: elementary-data/elementary Length of output: 164 🏁 Script executed: #!/usr/bin/env bash
set -u
printf '%s\n' '--- workflow context ---'
sed -n '85,120p' .github/workflows/test-warehouse.yml
printf '%s\n' '--- checkout references ---'
rg -n -C 2 'actions/checkout|allow-unsafe-pr-checkout|actionlint' .github . 2>/dev/null | head -200
printf '%s\n' '--- actionlint availability ---'
if command -v actionlint >/dev/null 2>&1; then
actionlint --version
actionlint .github/workflows/test-warehouse.yml
printf 'actionlint_exit=%s\n' "$?"
else
printf '%s\n' 'actionlint: not installed'
fi
printf '%s\n' '--- checkout v6 metadata ---'
if command -v curl >/dev/null 2>&1; then
curl -fsSL https://raw.githubusercontent.com/actions/checkout/v6/action.yml | \
awk '/^[[:space:]]*allow-unsafe-pr-checkout:/,/^[[:space:]]*[A-Za-z0-9_-]+:/{print}' | head -10
printf 'curl_exit=%s\n' "$?"
else
printf '%s\n' 'curl: not installed'
fiRepository: elementary-data/elementary Length of output: 8102 🏁 Script executed: #!/usr/bin/env bash
set -u
printf '%s\n' '--- actionlint references and configuration ---'
rg -n -C 3 'actionlint|reviewdog|rhysd|workflow-files|actions/checkout' \
.github Makefile* justfile* Taskfile* package.json pyproject.toml .pre-commit-config.yaml 2>/dev/null | head -300
printf '%s\n' '--- actionlint help and embedded metadata clues ---'
actionlint -help 2>&1 | head -120
printf '%s\n' '--- checkout v6 metadata ---'
curl -fsSL https://raw.githubusercontent.com/actions/checkout/v6/action.yml | \
sed -n '/allow-unsafe-pr-checkout/,+8p'
printf '%s\n' '--- checkout v6 ref resolution ---'
curl -fsSL https://api.github.com/repos/actions/checkout/git/ref/tags/v6 \
-H 'Accept: application/vnd.github+json' | jq '{ref, object}'
curl -fsSL https://api.github.com/repos/actions/checkout/releases/tags/v6.1.0 \
-H 'Accept: application/vnd.github+json' | jq '{tag_name, published_at, target_commitish, body}'
printf '%s\n' '--- actionlint releases ---'
curl -fsSL https://api.github.com/repos/rhysd/actionlint/releases/tags/1.7.12 \
-H 'Accept: application/vnd.github+json' | jq '{tag_name, published_at, target_commitish, body}'Repository: elementary-data/elementary Length of output: 10422 Update
🧰 Tools🪛 actionlint (1.7.12)[error] 107-107: input "allow-unsafe-pr-checkout" is not defined in action "actions/checkout@v6". available inputs are "clean", "fetch-depth", "fetch-tags", "filter", "github-server-url", "lfs", "path", "persist-credentials", "ref", "repository", "set-safe-directory", "show-progress", "sparse-checkout", "sparse-checkout-cone-mode", "ssh-key", "ssh-known-hosts", "ssh-strict", "ssh-user", "submodules", "token" (action) 🪛 zizmor (1.29.0)[warning] 95-107: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 🤖 Prompt for AI AgentsSource: Linters/SAST tools
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not actionable here: this repo doesn't run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| - name: Configure AWS credentials | ||
| uses: aws-actions/configure-aws-credentials@v4 | ||
|
|
@@ -110,6 +121,7 @@ jobs: | |
| repository: elementary-data/dbt-data-reliability | ||
| path: dbt-data-reliability | ||
| ref: ${{ inputs.dbt-data-reliability-ref }} | ||
| persist-credentials: false | ||
|
|
||
| - name: Validate workflow inputs | ||
| run: | | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.