Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
test: conductor-negtest AC-11 负向回归工具(W0-C3 #132,ADR-0049) #154
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
Uh oh!
There was an error while loading. Please reload this page.
test: conductor-negtest AC-11 负向回归工具(W0-C3 #132,ADR-0049) #154
Changes from all commits
6803e6eFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 169
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 1627
🌐 Web query:
GitHub Actions workflow_dispatch workflow file default branch --ref documentation💡 Result:
To trigger a GitHub Actions workflow using the workflow_dispatch event, the workflow file must exist on the repository's default branch [1][2][3]. This is a core requirement of the platform; if the workflow file is not present on the default branch, it cannot be triggered manually, even via the GitHub CLI or REST API [1][4]. Once the workflow is established on the default branch, you can execute it against other branches or tags using the following methods: GitHub UI: When manually triggering a workflow in the Actions tab, you are presented with a Branch dropdown menu that allows you to select any branch or tag in the repository as the reference point for that run [1][5]. GitHub CLI (gh): You can specify a target branch or tag by using the --ref flag [1][6]. gh workflow run WORKFLOW_FILE_NAME --ref BRANCH_OR_TAG_NAME REST API: When using the Create a workflow dispatch event endpoint, you must include the ref parameter in the request body to specify the branch or tag [1][7]. POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches { "ref": "BRANCH_OR_TAG_NAME" } Important Considerations: Workflows and Branch Parity: While the workflow file must exist on the default branch to be "registered" and visible for manual triggering, GitHub will execute the version of the workflow file that exists on the branch or tag specified by the --ref (or ref) parameter [4]. To test changes in a feature branch, you must ensure the file exists in that branch with the same name as the one on the default branch [4][8]. Debugging: If you are attempting to run a new workflow that has not yet been merged to the default branch, it will not appear in your list of available workflows [6][4]. A common workaround is to temporarily add a push or pull_request trigger to the workflow file and push it to your feature branch; once the workflow has run at least once, GitHub will recognize it, allowing you to use workflow_dispatch [6]. You can then remove the temporary trigger [6].
Citations:
gh workflow run --ref [ref]ignoringrefcli/cli#9781🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 8122
🌐 Web query:
site:cli.github.com/manual/gh_api --input default method POST GET💡 Result:
In the context of the GitHub CLI (gh api), the default HTTP request method is GET [1]. However, it automatically switches to POST if any parameters are added to the request [1]. When using the --input flag to provide a request body (such as from a file or standard input), the command defaults to GET unless an explicit method is specified using the --method flag [1]. If your intent when using --input is to send a payload that requires a different method (like POST or PUT), you must explicitly define it using the --method or -X flag [1].
Citations:
🌐 Web query:
GitHub REST API issues labels add labels to an issue POST /issues/{issue_number}/labels💡 Result:
To add labels to a GitHub issue, you use the following REST API endpoint [1][2]: POST /repos/{owner}/{repo}/issues/{issue_number}/labels Parameters: - owner: The account owner of the repository. The name is not case sensitive [1][2]. - repo: The name of the repository without the.git extension. The name is not case sensitive [1][2]. - issue_number: The number that identifies the issue [1][2]. Body parameters: - labels: An array of strings representing the labels to add to the issue's existing labels [1][2]. GitHub recommends passing an object with a labels key, though you can pass an array of labels directly [1][2]. Important distinction: This endpoint adds labels to an issue without removing existing ones [1][2]. If you wish to replace all labels for an issue, you should use the "Set labels for an issue" endpoint instead, which uses the PUT method [1][3]: PUT /repos/{owner}/{repo}/issues/{issue_number}/labels
Citations:
将工作流文件放入
main,并显式使用POST。如果
conductor-negtest.yml仅存在于conductor-negtest-tool,workflow_dispatch --ref无法触发它。将文件保留在默认分支main,再使用--ref conductor-negtest-tool选择运行版本。gh api --input -默认使用GET,但添加标签接口需要POST。为该命令添加--method POST。🤖 Prompt for AI Agents
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.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 4842
🌐 Web query:
GitHub Actions workflow_dispatch who can manually run a workflow write access github.actor permissions documentation💡 Result:
By default, any user with write access to a repository can manually trigger a workflow configured with the workflow_dispatch event [1][2]. To manually trigger these workflows, the workflow file must reside on the default branch of the repository [1][3]. As of June 2026, GitHub introduced more granular control over who can trigger workflows through Actor rules [2]. These rules allow repository administrators to move beyond the default write-access requirement by specifying: 1. Permitted individuals or repository roles (e.g., Read, Maintain, or Admin) [2]. 2. Limitations to restrict workflow_dispatch to specific groups, such as maintainers, to prevent abuse [2]. 3. Blocking specific identities from triggering workflows entirely [2]. These Actor rules provide a way to decouple contribution access (write access to code) from execution authority (the ability to trigger workflows), allowing organizations to grant users write access to a repository without automatically granting them the power to execute manual workflows [2]. Regarding the workflow_dispatch event specifically: - Users trigger the event via the GitHub UI (Actions tab), the GitHub CLI, or the REST API [1]. - If defined, any required inputs must be provided at the time of execution [1]. - The
github.actorcontext variable will identify the user who manually triggered the workflow [2]. For organizations seeking to enforce stricter security, these new policy controls can be applied centrally to prevent "poisoned pipeline" execution and unauthorized manual-trigger usage [2].Citations:
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 862
🌐 Web query:
site:docs.github.com workflow_dispatch workflow file must exist on default branch ref manually run workflow💡 Result:
Yes, the workflow file must exist on the repository's default branch for the workflow_dispatch event to trigger [1][2][3]. Even if you intend to run the workflow on a different branch or commit, the workflow configuration (the YAML file) must be present on the default branch for GitHub to recognize and execute the workflow_dispatch trigger [1][4]. Once the workflow is correctly configured on the default branch, you can trigger it for other branches or specific git references in the following ways: 1. Manual UI Trigger: When manually running the workflow via the GitHub Actions UI, you can select the desired branch or tag from the Branch dropdown menu [4]. 2. GitHub CLI (gh): You can use the --ref flag to specify the target branch or tag [4]: gh workflow run WORKFLOW_FILE --ref BRANCH_NAME 3. REST API: When using the Create a workflow dispatch event endpoint, you must provide the ref parameter in the request body to specify the branch, tag, or commit SHA [5]. In all cases, the workflow definition itself must remain on the default branch to enable the trigger [1][2][3].
Citations:
🌐 Web query:
site:docs.github.com GitHub CLI gh api --input method default POST GET💡 Result:
The GitHub CLI
gh apicommand usesGETas its default HTTP method if no other method is specified [1][2]. When you use the--inputflag (often passed as--input -to read from standard input), it allows you to provide a JSON payload for the request body, which is typically used with methods likePOSTorPATCH[3]. Becausegh apidefaults toGET[1], you must explicitly specify the desired HTTP method using the--methodflag (e.g.,--method POSTor--method PATCH) when your request requires a body provided via--input[3]. In summary: - Default method:GET[1]. - When using--input: You should explicitly define the method using--methodto match the intended operation (e.g.,POST,PATCH), asGETrequests generally do not include a request body [3].Citations:
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 1732
🌐 Web query:
GitHub Actions restrict workflow_dispatch to specific actors repository actor rules organization owners documentation💡 Result:
To restrict workflow_dispatch to specific actors, you can use GitHub's "Workflow execution protections," a feature that allows administrators to define explicit allow lists for who can trigger workflows and which events are permitted [1][2][3]. Key details regarding this functionality include: - Purpose: These protections allow you to separate code contributors from those who can execute CI workflows, preventing unauthorized actors from manually triggering workflows (e.g., using workflow_dispatch) [1][2][3]. - Implementation: Administrators can configure these policies at the organization or repository level within the "Policies" section of the Actions settings [2][3]. - Actor Rules: You can define rules that specify exactly who can trigger workflows. These rules support individual users, repository roles (e.g., Read, Maintain, Admin), and automated identities like GitHub Apps, Copilot, and Dependabot [1][2][3]. - Event Rules: You can pair these actor rules with specific event rules, such as restricting workflow_dispatch to maintainers, to ensure that only trusted identities can perform manual triggers [1][3]. Before the introduction of these official policies, users often implemented custom solutions, such as creating reusable workflows that programmatically checked the actor's permission level against the repository using the GitHub API [4]. With the current workflow execution protections, this can now be handled natively through centralized administrative policies [1][2][3].
Citations:
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 2956
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 313
限制
workflow_dispatch的触发者当前工作流已存在于默认分支
main,但未限制github.actor。具有仓库写权限的用户可以手动触发工作流,并获得issues: write权限。请仅允许 owner 账户触发,并将issues: write移至negtestjob 的permissions。🤖 Prompt for AI Agents
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.
3. No actor restriction enforced
🐞 Bug⛨ SecurityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation toolsThere 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.
2. Label request stays get
🐞 Bug≡ CorrectnessAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation toolsThere 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.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 32333
显式指定
POST以添加 Issue 标签。gh api在仅使用--input -时仍使用默认的GET方法。当前请求只会读取 Issue 标签,不会添加state:ir-signed。请添加--method POST。建议修改
📝 Committable suggestion
🤖 Prompt for AI Agents
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.
4. Api response fully discarded
🐞 Bug◔ ObservabilityAgent Prompt
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation toolsThere 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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 375
🏁 Script executed:
Repository: Cloudbird-Software/.github
Length of output: 1593
🌐 Web query:
GitHub REST API GET /user GitHub Actions GITHUB_TOKEN installation access token Resource not accessible by integration💡 Result:
The "Resource not accessible by integration" (403 Forbidden) error when calling the GET /user endpoint using the default GITHUB_TOKEN in GitHub Actions occurs primarily because this endpoint requires user-to-server authentication (such as a personal access token or OAuth token) rather than a GitHub App installation access token [1]. The GITHUB_TOKEN provided in GitHub Actions is a GitHub App installation access token with permissions strictly limited to the repository where the workflow is executing [2]. It is not designed to authenticate requests for user-level profile information via the /user endpoint [1][3]. Key considerations and resolutions: 1. Endpoint limitations: The GET /user endpoint is intended for authenticating as a specific user to access private profile data [4]. Because the GITHUB_TOKEN identifies the GitHub App installation—not a human user—it cannot be used to retrieve authenticated user information through this specific endpoint [1][3]. 2. Identifying the workflow initiator: If your goal is to identify the user who triggered the workflow, do not use the REST API. Instead, rely on the GitHub Actions context, which provides this information directly [3]: - Use the environment variable$GITHUB_ACTOR to get the username of the user who initiated the workflow. - Access the github.actor context in your workflow steps. 3. Troubleshooting other "Resource not accessible" errors: If you encounter this error on other API endpoints (that are supported by GITHUB_TOKEN), it typically signifies that the token lacks the necessary permissions [5][6][7]. To resolve this: - Verify the required permissions for the endpoint in the GitHub API documentation [5][6]. - Explicitly grant the necessary permissions in your workflow file using the permissions key [8][9][10]. - Note that specifying any permissions in a workflow file switches the GITHUB_TOKEN from default permissive mode to an explicit model, meaning you must declare all required permissions [10]. 4. Using a Personal Access Token (PAT): If you absolutely require access to endpoints or data not permitted via the GITHUB_TOKEN, you must use a Personal Access Token (or a GitHub App token with correct scopes) stored as a repository secret and referenced as $ {{ secrets.YOUR_PAT_SECRET }} [8][11].
Citations:
不要用固定回退值掩盖身份查询失败。
GITHUB_TOKEN调用gh api user会返回 403。当前回退值会把 API 失败显示为成功身份。请移除回退值并让步骤失败,或使用GITHUB_ACTOR表示触发者身份。🤖 Prompt for AI Agents