Conversation
9b28510 to
7576bed
Compare
|
Claude finished @spbolton's task in 3m 8s —— View job Code ReviewThe core logic is sound and the consolidation from 5 scripts to one entry point is a clear improvement. A few issues worth calling out: 1. targets = [{'id': int(specific_job_id), 'name': f'Job {specific_job_id}'}]
targets = [{'id': specific_job_id, 'name': f'Job {specific_job_id}'}]2. Dead fallback for annotations —
3. Stray blank lines inside list literals — result = _run_gh(
[
"gh", "run", "view", run_id,
# ← blank line here
"--json", "conclusion,...
],Same pattern in 4. The fix ( ran_non_cleanup = {step['number'] for step in steps
if step.get('conclusion') and not is_cleanup_step(step)}
later_ran = any(n > number for n in ran_non_cleanup)For the triggering scenario (CLI Deploy fails w/ Edge case acknowledged: a 5. if "403" in stderr or "rate limit" in stderr.lower():
raise DiagnosticError("Rate limit hit...")
Summary: Clean PR. Issues 1 and 3 are minor fixes, issue 2 is a documentation inconsistency, issues 4 and 5 are low-risk observations. WORKFLOWS.md addition is a valuable diagnostic reference. |
|
Semgrep found 1 Risk: Affected versions of storybook are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') / Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') / Missing Origin Validation in WebSockets. Storybook's dev server WebSocket endpoint does not validate the Manual Review Advice: A vulnerability from this advisory is reachable if you visit a malicious website while your local Storybook dev server is running Fix: Upgrade this library to at least version 10.2.10 at core/core-web/yarn.lock:20288. Reference(s): GHSA-mjf5-7g4m-gx5w, CVE-2026-27148 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of rollup are vulnerable to Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). Rollup is vulnerable to arbitrary file write via path traversal: chunk/asset names derived from user-controlled inputs (e.g., CLI named inputs, manual chunk aliases, or malicious plugins) are insufficiently sanitized, allowing Manual Review Advice: A vulnerability from this advisory is reachable if you are running Fix: Upgrade this library to at least version 4.59.0 at core/core-web/yarn.lock:19323. Reference(s): GHSA-mw96-cpmx-2vgc, CVE-2026-27606 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of next are vulnerable to Deserialization of Untrusted Data / Uncontrolled Resource Consumption. A flaw in React Server Components' deserialization allows an attacker to send a specially crafted HTTP request to any App Router Server Function endpoint in Next.js, triggering excessive CPU usage, out-of-memory conditions, or a server crash and resulting in a denial of service. Fix: Upgrade this library to at least version 15.0.8 at core/core-web/yarn.lock:16728. Reference(s): GHSA-h25m-26qc-wcjf, CVE-2026-23864 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of next are vulnerable to Dependency on Vulnerable Third-Party Component / Deserialization of Untrusted Data / Uncontrolled Resource Consumption. An attacker can send a specially crafted HTTP request to any Server Function endpoint (as used by Next.js' App Router) that, when deserialized by the React Server Components runtime, enters an infinite loop—hanging the server process, exhausting CPU, and resulting in a denial-of-service. Fix: Upgrade this library to at least version 14.2.35 at core/core-web/yarn.lock:16728. Reference(s): GHSA-5j59-xgg2-r9c4, CVE-2025-67779 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of next are vulnerable to Dependency on Vulnerable Third-Party Component / Deserialization of Untrusted Data / Uncontrolled Resource Consumption. A flaw in Next.js's App Router deserialization allows an attacker to send a specially crafted HTTP request body that, when parsed by the server, triggers excessive CPU work or an infinite loop. By targeting any App Router endpoint with this malicious payload, the server process can hang and become unresponsive, resulting in a denial-of-service. Fix: Upgrade this library to at least version 14.2.34 at core/core-web/yarn.lock:16728. Reference(s): GHSA-mwv6-3258-q52c If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: Affected versions of rollup are vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Manual Review Advice: A vulnerability from this advisory is reachable if you use Rollup to bundle JavaScript with Fix: Upgrade this library to at least version 4.22.4 at core/core-web/yarn.lock:19323. Reference(s): GHSA-gcx4-mw62-g8wm, CVE-2024-47068 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1 Risk: webpack 5.x before 5.76.0 is vulnerable to Improper Access Control due to ImportParserPlugin.js mishandling the magic comment feature. Due to this, webpack does not avoid cross-realm object access and an attacker who controls a property of an untrusted object can obtain access to the real global object. Manual Review Advice: A vulnerability from this advisory is reachable if you host an application utilizing webpack and an attacker can control a property of an untrusted object Fix: Upgrade this library to at least version 5.76.0 at core/core-web/yarn.lock:21903. Reference(s): GHSA-hc6q-2mpp-qw7j, CVE-2023-28154 If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. |
|
Semgrep found 1 The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files. In Java, you may also consider using a utility method such as View Dataflow Graphflowchart LR
classDef invis fill:white, stroke: none
classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none
subgraph File0["<b>dotCMS/src/main/java/com/dotcms/rest/ContentResource.java</b>"]
direction LR
%% Source
subgraph Source
direction LR
v0["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]
end
%% Intermediate
subgraph Traces0[Traces]
direction TB
v2["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]
v3["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1428 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1428] multipartPUTandPOST</a>"]
v4["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1484 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1484] multipart</a>"]
v5["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]
v6["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]
v7["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1581 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1581] processFile</a>"]
v8["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1613 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1613] part</a>"]
v9["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1616 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1616] badFileName</a>"]
v10["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1617 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1617] filename</a>"]
end
v2 --> v3
v3 --> v4
v4 --> v5
v5 --> v6
v6 --> v7
v7 --> v8
v8 --> v9
v9 --> v10
%% Sink
subgraph Sink
direction LR
v1["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1632 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1632] tmpFolder.getAbsolutePath() + File.separator + filename</a>"]
end
end
%% Class Assignment
Source:::invis
Sink:::invis
Traces0:::invis
File0:::invis
%% Connections
Source --> Traces0
Traces0 --> Sink
If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. Semgrep found 1
Detected user input controlling a file path. An attacker could control the location of this file, to include going backwards in the directory with '../'. To address this, ensure that user-controlled variables in file paths are sanitized. You may also consider using a utility method such as org.apache.commons.io.FilenameUtils.getName(...) to only retrieve the file name from the path. View Dataflow Graphflowchart LR
classDef invis fill:white, stroke: none
classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none
subgraph File0["<b>dotCMS/src/main/java/com/dotcms/rest/ContentResource.java</b>"]
direction LR
%% Source
subgraph Source
direction LR
v0["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]
end
%% Intermediate
subgraph Traces0[Traces]
direction TB
v2["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1424 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1424] multipart</a>"]
v3["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1428 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1428] multipartPUTandPOST</a>"]
v4["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1484 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1484] multipart</a>"]
v5["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]
v6["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1499 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1499] part</a>"]
v7["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1581 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1581] processFile</a>"]
v8["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1613 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1613] part</a>"]
v9["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1616 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1616] badFileName</a>"]
v10["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1617 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1617] filename</a>"]
end
v2 --> v3
v3 --> v4
v4 --> v5
v5 --> v6
v6 --> v7
v7 --> v8
v8 --> v9
v9 --> v10
%% Sink
subgraph Sink
direction LR
v1["<a href=https://github.com/dotCMS/core/blob/9b28510ed3241697614d8e431ba912b7139dd856/dotCMS/src/main/java/com/dotcms/rest/ContentResource.java#L1631 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 1631] new File(<br> tmpFolder.getAbsolutePath() + File.separator + filename)</a>"]
end
end
%% Class Assignment
Source:::invis
Sink:::invis
Traces0:::invis
File0:::invis
%% Connections
Source --> Traces0
Traces0 --> Sink
If this is a critical or high severity finding, please also link this issue in the #security channel in Slack. |
…ale message, step numbering Address review feedback from #34866: - Fix continue-on-error heuristic: check if later non-cleanup steps *ran* (not just succeeded), so consecutive continue-on-error failures are correctly labeled instead of the first one being misidentified as the job killer. - Fix stale "No ##[error] lines" message to reflect expanded error pattern set. - Fix SKILL.md step numbering gap (was 1,3,4,5,6,7,8 → now 1-7). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Addressed the review in e80777b. Assessment of each issue:
|
…ror handling (#34865) Add DiagnosticError, preflight_check(), and _run_gh() wrapper to replace raw subprocess calls with actionable error messages. Fix dead-code bug where Path objects were checked with truthiness instead of .exists(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tection, and improved error extraction - Add diagnose.py as single entry point with progressive subcommands (--metadata, --jobs, --annotations, --logs, --evidence) - fetch-jobs.py now shows all jobs + step-level detail with continue-on-error detection (excludes Post/cleanup steps) - Improved error extraction: catches npm error, BUILD FAILURE in addition to ##[error] lines - WORKFLOWS.md documents trunk deployment step behavior including continue-on-error flags and artifact-run-id propagation chain - SKILL.md rewritten: triage-first approach, diagnose.py as primary tool, explicit guidance against ad-hoc gh/python commands - github_api.py: preflight validates dotCMS/core checkout, DiagnosticError class, _run_gh wrapper with actionable errors - settings.json: add permissions for diagnostic script execution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tions Remove init-diagnostic.py, fetch-metadata.py, fetch-jobs.py, fetch-logs.py, and fetch-annotations.py. All functionality is covered by diagnose.py with progressive subcommands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ale message, step numbering Address review feedback from #34866: - Fix continue-on-error heuristic: check if later non-cleanup steps *ran* (not just succeeded), so consecutive continue-on-error failures are correctly labeled instead of the first one being misidentified as the job killer. - Fix stale "No ##[error] lines" message to reflect expanded error pattern set. - Fix SKILL.md step numbering gap (was 1,3,4,5,6,7,8 → now 1-7). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e80777b to
feaabe2
Compare
Summary
Closes #34865
Fixes a misdiagnosis bug where the skill blamed a
continue-on-errorstep (CLI Deploy / maven-repo) instead of the actual failure (SDKs Publish / npm 403). Addsdiagnose.pyas a single entry point that replaces multi-script orchestration.Key changes
diagnose.py— Single entry point with progressive subcommands (--metadata,--jobs,--annotations,--logs,--evidence). One permission pattern covers all operations.fetch-jobs.py— Step-level detail withcontinue-on-errordetection. Correctly identifies which step killed the job vs which errors were masked.npm error,npm ERR!,BUILD FAILUREin addition to##[error]lines.WORKFLOWS.md— Documents deployment stepcontinue-on-errorflags and artifact-run-id propagation.SKILL.md— Rewritten: triage-first,diagnose.pyas primary tool, explicit guidance against ad-hoc commands.github_api.py—DiagnosticErrorclass,_run_ghwrapper, preflight validatesdotCMS/corecheckout..claude/settings.json— Permissions for diagnostic script execution.Before/After
Before: Skill sees
##[error] Artifact not found for name: maven-repo→ blames CLI Deploy → proposes wrong fix.After:
diagnose.pyoutput shows:Test plan
diagnose.py <RUN_ID>— full evidence gathering, correct root cause identificationdiagnose.py <RUN_ID> --jobs— step-level detail with continue-on-error flagsdiagnose.py <RUN_ID> --logs <JOB_ID>— npm/build errors extracted alongside ##[error]Bash(python3 .claude/skills/cicd-diagnostics/*)sufficient🤖 Generated with Claude Code
This PR fixes: #34865