-
Notifications
You must be signed in to change notification settings - Fork 2
feat(deps): migrate auth imports from phenotype-go-kit to phenotype-go-auth #827
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
Changes from all commits
87726f9
26722cb
a1a831f
a216992
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 | ||
|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||
| # Airlock workflow configuration | ||||
| # Documentation: https://github.com/airlock-hq/airlock | ||||
|
|
||||
| name: Main Pipeline | ||||
|
|
||||
| on: | ||||
| push: | ||||
| branches: ['**'] | ||||
|
||||
| branches: ['**'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cd .airlock/workflows && find . -name "main.yml" -type fRepository: KooshaPari/cliproxyapi-plusplus
Length of output: 85
🏁 Script executed:
cat -n .airlock/workflows/main.yml | head -50Repository: KooshaPari/cliproxyapi-plusplus
Length of output: 1583
🌐 Web query:
GitHub Actions on.push recursive trigger prevention branches-ignore syntax
💡 Result:
To prevent recursive on: push triggers (a workflow commits/pushes and re-triggers itself), branches-ignore can help only if you push your automation commits to a branch you ignore—it can’t “ignore pushes made by this workflow” by itself.
1) branches-ignore syntax (for on: push)
on:
push:
branches-ignore:
- "automation/**"
- "gh-actions/**"
- "release/**-alpha"branches-ignore is a list of glob patterns matched against the branch ref name. You cannot use branches and branches-ignore together for the same event. If you need include+exclude, use branches with ! negative patterns instead. [1]
2) Practical pattern: push automation commits to a dedicated branch, then ignore it
Workflow A runs on main, commits, and pushes to automation/update-files; your normal CI workflow ignores automation/** so it won’t loop.
on:
push:
branches:
- main
# (or ignore the automation branch in the workflow(s) you *don't* want triggered)on:
push:
branches-ignore:
- "automation/**"(Using branch filters this way is exactly what branches-ignore is for.) [1]
3) The built-in recursion guard you usually want: use GITHUB_TOKEN for the push
If your workflow pushes using the repository GITHUB_TOKEN, events caused by that token generally do not start new workflow runs, which prevents accidental recursion. [2]
If you do want the push to trigger other workflows, you typically must push using a PAT or GitHub App token instead. [2]
4) Alternative: skip runs via commit message
For push / pull_request workflows, adding e.g. [skip ci] / [skip actions] (or the skip-checks: true trailer) to the commit message will skip the workflow run that commit would have triggered. [3]
Sources
[1] GitHub Docs — Workflow syntax (on.push.branches-ignore, glob patterns, include/exclude rules): https://docs.github.com/actions/reference/workflows-and-actions/workflow-syntax
[2] GitHub Docs — Triggering a workflow from a workflow (GITHUB_TOKEN won’t create new workflow runs): https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow
[3] GitHub Docs — Skipping workflow runs (commit message / trailer): https://docs.github.com/en/actions/how-tos/manage-workflow-runs/skip-workflow-runs
Prevent recursive triggers from push-on-push behavior.
Line 8 triggers on every branch with branches: ['**']. When the push step (line 39–40) commits changes, the workflow will re-run unless protected. However, the suggested fix has a syntax issue: you cannot use both branches and branches-ignore in the same trigger.
Use one of these approaches instead:
-
Recommended: Verify the push step uses
GITHUB_TOKEN. Ifairlock-hq/airlock/defaults/push@mainpushes with the defaultGITHUB_TOKEN, GitHub automatically prevents triggered workflow runs—no recursion occurs. -
If you need branch filtering, replace (not add to) the
brancheskey:- Use
branches-ignoreto exclude automation branches, or - Use
brancheswith negative patterns:branches: ['**', '!automation/**']
- Use
Check the Airlock documentation to confirm which token the push action uses and whether recursion prevention is already built in.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.airlock/workflows/main.yml around lines 6 - 9, The workflow's push trigger
uses branches: ['**'] which can cause recursive runs when the push step
(airlock-hq/airlock/defaults/push@main) commits changes; verify the push action
uses the default GITHUB_TOKEN (which prevents recursion) and if it does not,
change the push action to use GITHUB_TOKEN or otherwise prevent recursion;
alternatively, if you must filter branches, replace the current branches key
with either branches-ignore to exclude automation branches or use a branches
array with a negative pattern (e.g., include '**' and exclude 'automation/**')
rather than adding both branches and branches-ignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, check if the file exists and view its content
if [ -f .airlock/workflows/main.yml ]; then
echo "=== File exists. Showing content with line numbers: ==="
cat -n .airlock/workflows/main.yml
else
echo "File not found at .airlock/workflows/main.yml"
# Try to find it
find . -name "main.yml" -o -name "*.yml" | head -20
fiRepository: KooshaPari/cliproxyapi-plusplus
Length of output: 1639
Pin workflow actions to immutable commit SHAs instead of @main.
Lines 16, 20, 28, 32, 36, 40, and 45 use mutable branch references (@main). This creates supply-chain and reproducibility risks for CI behavior, as the referenced actions can change without notice.
Replace each @main ref with a specific commit SHA:
Suggested changes
- uses: airlock-hq/airlock/defaults/rebase@main
+ uses: airlock-hq/airlock/defaults/rebase@<commit-sha>
- uses: airlock-hq/airlock/defaults/lint@main
+ uses: airlock-hq/airlock/defaults/lint@<commit-sha>
- uses: airlock-hq/airlock/defaults/describe@main
+ uses: airlock-hq/airlock/defaults/describe@<commit-sha>
- uses: airlock-hq/airlock/defaults/document@main
+ uses: airlock-hq/airlock/defaults/document@<commit-sha>
- uses: airlock-hq/airlock/defaults/test@main
+ uses: airlock-hq/airlock/defaults/test@<commit-sha>
- uses: airlock-hq/airlock/defaults/push@main
+ uses: airlock-hq/airlock/defaults/push@<commit-sha>
- uses: airlock-hq/airlock/defaults/create-pr@main
+ uses: airlock-hq/airlock/defaults/create-pr@<commit-sha>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.airlock/workflows/main.yml at line 16, Replace all mutable action refs that
use the branch suffix "@main" with immutable commit SHAs for each occurrence
(e.g., the uses entries like "airlock-hq/airlock/defaults/rebase@main" and the
other uses lines at the same pattern). Locate the seven "uses: ...@main" entries
(the ones currently referencing `@main`) and update each to a specific commit SHA
(one SHA per action) so the workflow is pinned to exact commits for
reproducibility and supply-chain safety.
Copilot
AI
Mar 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All uses: ...@main references are pinned to a moving branch, which increases supply-chain risk and can lead to non-reproducible runs. Pin these to immutable versions (a tagged release) or a specific commit SHA so the pipeline behavior is stable and auditable.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR title/description indicate a Go auth dependency/import migration, but the actual diff introduces an Airlock pipeline and deletes Spec Kitty-related assets. Please update the PR title/description (and test plan) to reflect the changes shown here, or split these changes into a separate PR to keep history and review scope coherent.