Skip to content

chore: adopt quality-zero-platform wrappers#105

Open
Prekzursil wants to merge 3 commits intomainfrom
feat/quality-zero-platform-rollout
Open

chore: adopt quality-zero-platform wrappers#105
Prekzursil wants to merge 3 commits intomainfrom
feat/quality-zero-platform-rollout

Conversation

@Prekzursil
Copy link
Copy Markdown
Owner

Summary

  • replace repo-local queue and superseded quality-zero workflows with the shared quality-zero-platform caller workflows
  • keep unrelated workflows intact, including sonarcloud.yml, codeql.yml, release-portable.yml, and the existing codecov-analytics.yml
  • trim queue-contract guidance from AGENTS.md while preserving the SWFOC evidence-first contract and canonical dotnet test tests/SwfocTrainer.Tests/SwfocTrainer.Tests.csproj -c Release --no-build --filter "FullyQualifiedName!~SwfocTrainer.Tests.Profiles.Live&FullyQualifiedName!~RuntimeAttachSmokeTests" verify command

Verification

  • parsed all .github/workflows/*.yml files successfully with PyYAML
  • confirmed the four wrapper workflows match the baseline template files byte-for-byte
  • reviewed git diff / git status to keep .github/PULL_REQUEST_TEMPLATE.md unstaged and out of this rollout commit

Rulesets

  • live ruleset updates are intentionally deferred until the required contexts are observed emitting from the wrapper rollout, per the platform playbook safety check

Co-authored-by: Codex <noreply@openai.com>
@devloai
Copy link
Copy Markdown

devloai bot commented Mar 10, 2026

Unable to trigger custom agent "Code Reviewer". You have run out of credits 😔
Please upgrade your plan or buy additional credits from the subscription page.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

Warning

Rate limit exceeded

@Prekzursil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 3 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b0637c0-3369-4e73-b089-9b03aa6e16f3

📥 Commits

Reviewing files that changed from the base of the PR and between b6a7027 and 84bea56.

⛔ Files ignored due to path filters (1)
  • visual-adapter/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (28)
  • .github/workflows/agent-label-sync.yml
  • .github/workflows/agent-task-queue.yml
  • .github/workflows/codacy-zero.yml
  • .github/workflows/codecov-analytics.yml
  • .github/workflows/coverage-100.yml
  • .github/workflows/deepscan-zero.yml
  • .github/workflows/provider-zero-backlog.yml
  • .github/workflows/quality-zero-backlog.yml
  • .github/workflows/quality-zero-gate.yml
  • .github/workflows/quality-zero-platform.yml
  • .github/workflows/quality-zero-remediation.yml
  • .github/workflows/semgrep-zero.yml
  • .github/workflows/sentry-zero.yml
  • .github/workflows/sonar-zero.yml
  • .github/workflows/visual-desktop-adapter.yml
  • .gitignore
  • AGENTS.md
  • scripts/verify
  • visual-adapter/gallery/app.mjs
  • visual-adapter/gallery/index.html
  • visual-adapter/gallery/states.json
  • visual-adapter/gallery/styles.css
  • visual-adapter/package.json
  • visual-adapter/playwright.applitools.config.mjs
  • visual-adapter/playwright.chromatic.config.mjs
  • visual-adapter/server.mjs
  • visual-adapter/tests/applitools.spec.mjs
  • visual-adapter/tests/chromatic.spec.mjs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/quality-zero-platform-rollout
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines +15 to +19
uses: Prekzursil/quality-zero-platform/.github/workflows/reusable-backlog-sweep.yml@main
with:
repo_slug: ${{ github.repository }}
tool: ${{ inputs.tool || 'coverage' }}
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 17 days ago

In general, the problem is fixed by adding an explicit permissions block to the workflow (either at the root level, applying to all jobs, or inside the specific job) so that the GITHUB_TOKEN is granted only the minimal scopes required. Since this workflow only delegates to a reusable workflow and there is no evidence here that write access is needed, the safest default is contents: read. If the reusable workflow needs additional permissions, they can be added later.

The single best fix without changing existing behavior is to add a root-level permissions block after the on: section (and before jobs:). This ensures all jobs in this workflow—including the backlog-sweep job using the reusable workflow—run with limited GITHUB_TOKEN permissions, unless overridden more specifically in the reusable workflow. Concretely, in .github/workflows/quality-zero-backlog.yml, after the workflow_dispatch inputs block (line 12) and before jobs: (line 13), insert:

permissions:
  contents: read

No imports or additional methods are needed; this is purely a YAML configuration change.

Suggested changeset 1
.github/workflows/quality-zero-backlog.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/quality-zero-backlog.yml b/.github/workflows/quality-zero-backlog.yml
--- a/.github/workflows/quality-zero-backlog.yml
+++ b/.github/workflows/quality-zero-backlog.yml
@@ -10,6 +10,9 @@
         required: true
         default: coverage
 
+permissions:
+  contents: read
+
 jobs:
   backlog-sweep:
     uses: Prekzursil/quality-zero-platform/.github/workflows/reusable-backlog-sweep.yml@main
EOF
@@ -10,6 +10,9 @@
required: true
default: coverage

permissions:
contents: read

jobs:
backlog-sweep:
uses: Prekzursil/quality-zero-platform/.github/workflows/reusable-backlog-sweep.yml@main
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +16 to +22
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'failure'
uses: Prekzursil/quality-zero-platform/.github/workflows/reusable-remediation-loop.yml@main
with:
repo_slug: ${{ github.repository }}
failure_context: ${{ inputs.failure_context || 'Quality Zero Gate' }}
sha: ${{ github.event.workflow_run.head_sha || github.sha }}
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 17 days ago

In general, the fix is to define an explicit permissions: block for the workflow or for the remediate job so that the GITHUB_TOKEN has only the minimal required scopes instead of inheriting potentially broad defaults. Since this workflow only triggers another workflow and passes metadata (repository, SHA, context), it likely needs only read access to repository contents.

The best minimal fix without changing existing functionality is to add a workflow‑level permissions: block with read‑only access to contents. This both documents the intended privilege level and ensures the token remains constrained even if repo/org defaults change. We’ll add:

permissions:
  contents: read

right after the name: at the top of .github/workflows/quality-zero-remediation.yml. This will apply to all jobs in this workflow (including remediate, which has no own permissions: block) and does not require any imports or additional definitions.

Concretely: edit .github/workflows/quality-zero-remediation.yml, inserting the permissions: stanza between line 1 (name: Quality Zero Remediation) and line 3 (on:). No other changes are needed.

Suggested changeset 1
.github/workflows/quality-zero-remediation.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/quality-zero-remediation.yml b/.github/workflows/quality-zero-remediation.yml
--- a/.github/workflows/quality-zero-remediation.yml
+++ b/.github/workflows/quality-zero-remediation.yml
@@ -1,5 +1,8 @@
 name: Quality Zero Remediation
 
+permissions:
+  contents: read
+
 on:
   workflow_run:
     workflows: ["Quality Zero Gate"]
EOF
@@ -1,5 +1,8 @@
name: Quality Zero Remediation

permissions:
contents: read

on:
workflow_run:
workflows: ["Quality Zero Gate"]
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47ac68687a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

name: quality-zero-gate
path: quality-zero-gate
aggregate-gate:
uses: Prekzursil/quality-zero-platform/.github/workflows/reusable-quality-zero-gate.yml@main
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pin reusable workflow to immutable revision

Calling the shared workflow with @main makes this repository’s required quality gate non-deterministic: any upstream change (or force-push) in Prekzursil/quality-zero-platform can silently alter or break CI here without a corresponding commit, which can block merges or weaken enforcement unexpectedly. Please pin to a commit SHA (and update intentionally) so gate behavior is reproducible and auditable.

Useful? React with 👍 / 👎.

Co-authored-by: Codex <noreply@openai.com>
workflow_dispatch:

permissions:
contents: read

Check notice

Code scanning / SonarCloud

Read permissions should be defined at the job level Low

Move this read permission from workflow level to job level. See more on SonarQube Cloud
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9dc880371

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

]);

function resolveRequestPath(urlPath) {
const safePath = decodeURIComponent((urlPath || "/").split("?")[0]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle malformed URI components before decoding request path

decodeURIComponent throws URIError for invalid percent-encoding, and this exception is currently uncaught, so a single request like /%E0%A4%A terminates the Node server and aborts the visual adapter run instead of returning an HTTP error. This makes the workflow brittle to malformed URLs from clients or intermediary tooling; the request path should be decoded defensively and mapped to a 4xx response rather than crashing the process.

Useful? React with 👍 / 👎.

const visibleStates = stateFilter ? states.filter((state) => state.id === stateFilter) : states;

if (visibleStates.length === 0) {
gallery.innerHTML = `<section class="state-card"><div class="card-body"><h2>Unknown state</h2><p>No adapter state matched <code>${stateFilter}</code>.</p></div></section>`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Escape state query value before writing unknown-state markup

The state query parameter is interpolated directly into innerHTML in the unknown-state branch, so a crafted URL (for example ?state=<img src=x onerror=alert(1)>) injects active HTML/JS into the page. Because this value is user-controlled and not sanitized here, this introduces a DOM XSS sink; reuse escapeHtml before rendering the parameter.

Useful? React with 👍 / 👎.

Point the quality-zero platform, gate, and Codecov analytics workflows at the controller-managed parity baseline so protected-branch pushes evaluate the same scanner stack as pull requests.

Co-authored-by: Codex <noreply@openai.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
5 New issues
8 Security Hotspots

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84bea563bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const stat = await fs.stat(resolved);
const target = stat.isDirectory() ? path.join(resolved, "index.html") : resolved;
const ext = path.extname(target);
res.writeHead(200, { "Content-Type": mimeTypes.get(ext) || "application/octet-stream" });
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Serve module scripts with a JavaScript MIME type

This response header falls back to application/octet-stream for unknown extensions, and mimeTypes does not include .mjs, so /app.mjs is served with a non-JavaScript MIME type. Browsers enforce strict MIME checks for <script type="module">, which causes the module to be blocked and the gallery UI/tests to fail to render state content. Add an .mjs mapping (or otherwise ensure module assets are returned as JavaScript).

Useful? React with 👍 / 👎.

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.

1 participant