Security audit node - Request failed with status code 404

Describe the problem/error/question

Hello! I’m trying to generate a security audit using a security audit node.
Steps:
Created n8n API key in “Settings“. For test purposes gave the scope “All“ (originally was tested on “SecurityAudit:generate“)
Created credentials in a project with this API key (test passed successful). Base URL = url of our n8n instance (on-prem)

Created a workflow with a security node (“Generate a security audit“): Credentials to connect with - credentials from the previous step, Resource - Audit, Operation - Generate
Tried to generate an audit, but received an error

Could you advise, please, what the cause of it might be?

What is the error message (if any)?

The resource you are requesting could not be found

Request failed with status code 404

From n8n

Error code

404

Full message

Request failed with status code 404

Node type

n8n-nodes-base.n8n
Node version

1 (Latest)
n8n version

1.109.2 (Self Hosted)
Stack trace

NodeApiError: The resource you are requesting could not be found at ExecuteSingleContext.httpRequestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_5aee33ef851c7de341eb325c6a25e0ff/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1365:9) at processTicksAndRejections (node:internal/process/task_queues:105:5) at ExecuteSingleContext.httpRequestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_5aee33ef851c7de341eb325c6a25e0ff/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/request-helper-functions.ts:1737:11) at RoutingNode.rawRoutingRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n

Please share your workflow

{
  "nodes": [
    {
      "parameters": {
        "resource": "audit",
        "operation": "generate",
        "additionalOptions": {},
        "requestOptions": {}
      },
      "type": "n8n-nodes-base.n8n",
      "typeVersion": 1,
      "position": [
        272,
        0
      ],
      "id": "[*removed id*]",
      "name": "Generate a security audit",
      "credentials": {
        "n8nApi": {
          "id": "[*removed id*]",
          "name": "n8n account"
        }
      }
    }
  ],
  "connections": {},
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "[*removed id*]"
  }
}

[*removed id*] - I removed any ids that might be related to my installation. The node was created with default settings from web ui.

Share the output returned by the last node

output the error only (shown above)

Information on your n8n setup

  • n8n version: 1.109.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): deployed in EKS
  • Operating system: AL2023 on EKS nodes

Hey Oleg, thank you for taking the time to report this issue.

There might be a bug in the n8n node. I’ve created a ticket in our internal system, and our engineers will take a look at it.

Meanwhile, please use custom HTTP requests as a workaround

Follow up: I think the issue was the incorrect Base URL set in the credentials.

I had http://localhost:5678 was getting 404 as well. After changing it to http://localhost:5678/api/v1 everything works.

Hello, I’m experiencing the same issue on my end, however using the ‘http://localhost:5678/api/v1’ URL does not seem to work.

My n8n instance is self-hosted in Azure, and I am able to use the ‘API Playground’ to authenticate to this URL: ‘https://n8n.<NAME>.com/api/v1/audit’, but not the ‘localhost’ url you mentioned @eugene.molodkin .

When attempting to insert the n8n. URL into the credentials in my ‘workflow’, it gives me the 404 error.

If I try to add the ‘localhost’ url in the credentials in the workflow, the authentication at first appears ‘successful’, and yet the workflow is failing stating 404, resource not found.