Skip to content

Conversation

@dariacodes
Copy link
Contributor

Summary

Related Linear tickets, Github issues, and Community forum posts

Closes ADO-4730

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

❌ Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...low-history/update-workflow-history-version.dto.ts 0.00% 3 Missing ⚠️
packages/@n8n/api-types/src/dto/index.ts 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Jan 29, 2026
@blacksmith-sh

This comment has been minimized.

@dariacodes dariacodes marked this pull request as ready for review January 29, 2026 14:42
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 11 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/cli/src/workflows/workflow-history/workflow-history.service.ts">

<violation number="1" location="packages/cli/src/workflows/workflow-history/workflow-history.service.ts:145">
P2: updateVersionForUser authorizes using only `workflow:read` via getVersion, so users with read access can update workflow history metadata. Consider requiring `workflow:update` (or a write-capable check) before calling updateVersion.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

updateData: UpdateWorkflowHistoryVersionDto,
) {
// Check rights and ensure version exists
await this.getVersion(user, workflowId, versionId, { includePublishHistory: false });
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 29, 2026

Choose a reason for hiding this comment

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

P2: updateVersionForUser authorizes using only workflow:read via getVersion, so users with read access can update workflow history metadata. Consider requiring workflow:update (or a write-capable check) before calling updateVersion.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/cli/src/workflows/workflow-history/workflow-history.service.ts, line 145:

<comment>updateVersionForUser authorizes using only `workflow:read` via getVersion, so users with read access can update workflow history metadata. Consider requiring `workflow:update` (or a write-capable check) before calling updateVersion.</comment>

<file context>
@@ -134,8 +135,24 @@ export class WorkflowHistoryService {
+		updateData: UpdateWorkflowHistoryVersionDto,
+	) {
+		// Check rights and ensure version exists
+		await this.getVersion(user, workflowId, versionId, { includePublishHistory: false });
+
+		await this.updateVersion(workflowId, versionId, updateData);
</file context>
Fix with Cubic

@dariacodes dariacodes marked this pull request as draft January 29, 2026 15:11
@codecov
Copy link

codecov bot commented Jan 29, 2026

Bundle Report

Bundle size has no change ✅

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

Labels

core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants