Skip to content

Github Actions Audit#17050

Open
QilongTang wants to merge 3 commits into
masterfrom
GithubActionAudit
Open

Github Actions Audit#17050
QilongTang wants to merge 3 commits into
masterfrom
GithubActionAudit

Conversation

@QilongTang
Copy link
Copy Markdown
Contributor

Purpose

What changed and why:

  • rules/ci-rules.md — terse, always-applicable constraints in the same style as dynamo-core-rules.md. Agents touching any workflow file will hit this first.
  • knowledge/github-actions-audit.md — the full point-in-time audit with bug inventory, fix snippets, and the phased remediation plan. Lives in knowledge/ because it will go stale as issues get fixed, and it's reference material rather than an always-applicable constraint.
  • The two files cross-reference each other so neither is a dead end.

Declarations

Check these if you believe they are true

Release Notes

(FILL ME IN) Brief description of the fix / enhancement. Use N/A to indicate that the changes in this pull request do not apply to Release Notes. Mandatory section

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

What changed and why:
  - rules/ci-rules.md — terse, always-applicable constraints in the same style as dynamo-core-rules.md. Agents touching any workflow file will
   hit this first.
  - knowledge/github-actions-audit.md — the full point-in-time audit with bug inventory, fix snippets, and the phased remediation plan. Lives
  in knowledge/ because it will go stale as issues get fixed, and it's reference material rather than an always-applicable constraint.
  - The two files cross-reference each other so neither is a dead end.
@QilongTang QilongTang requested a review from avidit April 15, 2026 06:56
@QilongTang
Copy link
Copy Markdown
Contributor Author

@avidit I started this but may not have too much time to spend on it this week. Feel free to take over if you feel some of the phased plan does make sense

@avidit avidit marked this pull request as ready for review April 15, 2026 15:58
Copilot AI review requested due to automatic review settings April 15, 2026 15:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds internal CI/CD guidance to .agents/ by introducing durable GitHub Actions rules plus a point-in-time audit of existing workflows.

Changes:

  • Added .agents/rules/ci-rules.md with “always applicable” GitHub Actions constraints (shell, auth, pinning, permissions, unnecessary work).
  • Added .agents/knowledge/github-actions-audit.md documenting an 18-workflow audit, issue inventory, and phased remediation plan.
  • Updated .agents/README.md to index the new rules/knowledge docs and reflect the folder structure.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.agents/rules/ci-rules.md New durable rules for GitHub Actions changes under .github/workflows/.
.agents/knowledge/github-actions-audit.md New audit report with issue inventory, remediation snippets, and phased plan.
.agents/README.md Links to the new rules/knowledge documents and updates the .agents/ structure overview.

| ID | Workflow | Location | Description |
|----|----------|----------|-------------|
| BUG-01 | `build_dynamo_core.yml` | Line 93 | Linux binary check **always passes** — `test "./DynamoCLI.exe"` evaluates the non-empty string, not the file. Also checks for `.exe` which doesn't exist on Linux. |
| BUG-02 | `auto_cherrypick.yml` | Line 48 | `if [[ $milestone -eq "" ]]` uses arithmetic `-eq` to compare a string; always evaluates as equal when milestone is non-numeric — null milestone check silently never fires. |
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In BUG-02’s description, [[ $milestone -eq "" ]] doesn’t “evaluate as equal” for non-numeric strings; in bash it triggers an arithmetic evaluation error and the condition is treated as false (so the null/empty check never runs). Please reword this to reflect the actual failure mode so the guidance is accurate.

Suggested change
| BUG-02 | `auto_cherrypick.yml` | Line 48 | `if [[ $milestone -eq "" ]]` uses arithmetic `-eq` to compare a string; always evaluates as equal when milestone is non-numeric — null milestone check silently never fires. |
| BUG-02 | `auto_cherrypick.yml` | Line 48 | `if [[ $milestone -eq "" ]]` uses arithmetic `-eq` to compare a string; for non-numeric values bash raises an arithmetic evaluation error and the condition is treated as false, so the null/empty milestone check never fires. |

Copilot uses AI. Check for mistakes.
Comment thread .agents/knowledge/github-actions-audit.md Outdated
@avidit avidit requested review from kalunkuo and zeusongit April 16, 2026 13:04
|----|----------|----------|-------------|
| BUG-01 | `build_dynamo_core.yml` | Line 93 | Linux binary check **always passes** — `test "./DynamoCLI.exe"` evaluates the non-empty string, not the file. Also checks for `.exe` which doesn't exist on Linux. |
| BUG-02 | `auto_cherrypick.yml` | Line 48 | `if [[ $milestone -eq "" ]]` uses arithmetic `-eq` to compare a string; always evaluates as equal when milestone is non-numeric — null milestone check silently never fires. |
| BUG-03 | `Issues_workflow.yml` | Lines 61, 137, 144, 150 | `curl -u admin:${{ secrets.GITHUB_TOKEN }}` is the wrong format for GitHub API auth. Will return 401 silently because `--fail` is absent. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The audit says all four locations use secrets.GITHUB_TOKEN, but line 61 actually uses secrets.DYNAMOBOTTOKEN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Address the comment above

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in commit 47a6a8b: BUG-03 now correctly states that line 61 uses DYNAMOBOTTOKEN while the other listed calls use GITHUB_TOKEN, and clarifies the issue is the curl -u admin:<token> auth format.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants