Skip to content

ci: Cat 1072 security nightly cleanup #17983

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

Merged
merged 2 commits into from
Aug 8, 2025

Conversation

shortstacked
Copy link
Contributor

Summary

  • Includes CVE details in scan slack message
  • Uses slack official action instead of 3rd party action
  • Adds detailed summary report to the Github action using Github Summaries
  • No longer sends on successful check, but will still add summary.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/CAT-1072/ci-remove-positive-result-from-nightly-security-scan

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)

@shortstacked shortstacked requested a review from tomi August 4, 2025 22:27
@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Aug 4, 2025
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.

cubic analysis

1 issue found across 2 files • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

[.Results[] | select(.Vulnerabilities != null) | .Vulnerabilities[]] |
group_by(.VulnerabilityID) |
map(.[0]) |
sort_by((.Severity == "HIGH" | if . then 1 else 0 end), -((.CVSS.nvd.V3Score // 0) | tonumber? // 0)) |
Copy link
Contributor

Choose a reason for hiding this comment

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

Invalid two-parameter call to sort_by will make the Slack-block jq script crash, so no Slack message will be posted.

Prompt for AI agents
Address the following comment on .github/workflows/security-trivy-scan-callable.yml at line 178:

<comment>Invalid two-parameter call to sort_by will make the Slack-block jq script crash, so no Slack message will be posted.</comment>

<file context>
@@ -4,123 +4,206 @@ on:
   workflow_dispatch:
     inputs:
       image_ref:
-        description: Full image reference to scan e.g ghcr.io/n8n-io/n8n:latest
+        description: &#39;Full image reference to scan e.g. ghcr.io/n8n-io/n8n:latest&#39;
         required: true
         default: &#39;ghcr.io/n8n-io/n8n:latest&#39;
   workflow_call:
     inputs:
</file context>
Suggested change
sort_by((.Severity == "HIGH" | if . then 1 else 0 end), -((.CVSS.nvd.V3Score // 0) | tonumber? // 0)) |
sort_by([(.Severity == "HIGH" | if . then 1 else 0 end), -((.CVSS.nvd.V3Score // 0) | tonumber? // 0)]) |

Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

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

I am happy to approve this, but I can't shake the feeling that all the inline jq logic within the workflow makes this kinda hard to read and understand. While writing a custom GH action with typescript might be an overkill, maybe doing this with a simple JS script or moving the logic to shell files might make more sense. WDYT?

@@ -34,3 +34,4 @@ compiled_app_output
trivy_report*
compiled
packages/cli/src/modules/my-feature
.secrets
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, is this for something local development or?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it's for "ACT" which lets you run the workflows locally. It's a lifesaver for work like this.

Copy link

currents-bot bot commented Aug 5, 2025

E2E Tests: n8n tests passed after 3m 54.9s

🟢 500 · 🔴 0 · ⚪️ 0

View Run Details

Run Details

  • Project: n8n

  • Groups: 1

  • Framework: Currents

  • Run Status: Passed

  • Commit: 1fda465

  • Spec files: 105

  • Overall tests: 500

  • Duration: 3m 54.9s

  • Parallelization: 1


This message was posted automatically by currents.dev | Integration Settings

@shortstacked
Copy link
Contributor Author

I am happy to approve this, but I can't shake the feeling that all the inline jq logic within the workflow makes this kinda hard to read and understand. While writing a custom GH action with typescript might be an overkill, maybe doing this with a simple JS script or moving the logic to shell files might make more sense. WDYT?

Yeah I think you are right. As annoying as it would be I feel like having something to parse/format for Markdown in a script would be much more useful.

@shortstacked shortstacked merged commit a435d37 into master Aug 8, 2025
61 of 63 checks passed
@shortstacked shortstacked deleted the CAT-1072-security-nightly-cleanup branch August 8, 2025 11:37
@janober
Copy link
Member

janober commented Aug 11, 2025

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants