Skip to content
Data & Databases

Shadowed Own-Property Ownership Auditor with Safe Access Report

9 nodes 59 6 Manual trigger
Download

Loading workflow…

Workflow Description

A fully local n8n workflow that audits JSON records containing sensitive property names such as hasOwnProperty, constructor, toString, valueOf and __proto__. Payloads travel as raw JSON strings so those names survive as real own keys after JSON.parse. A recursive auditor walks objects and arrays, recording each sensitive key's path, value type and true ownership via Object.hasOwn and Object.getOwnPropertyDescriptor, never invoking a payload value. An If node routes on the computed passed flag, two Set nodes stamp the decision, Merge appends the branches, and a final Code node returns exactly one aggregated report with the raw payload preserved.

How it works

  1. 1.Manual Trigger emits one empty item
  2. 2.Load Sample Records emits four demo records shaped as { recordId, payloadJson }
  3. 3.Audit Own Properties parses the string with JSON.parse and flags missing or invalid payloads
  4. 4.Recursive scan (depth 12, cycle guard) logs path, name, type, own, severity and reason
  5. 5.failCount, warnCount and passed are computed per record
  6. 6.If Passed routes to Mark Accepted or Mark Needs Review with includeOtherFields
  7. 7.Merge Branches appends both branches into one stream
  8. 8.Build Audit Report runs once for all items, returning a single report with array-based counters

Use cases

  • Vetting payloads from untrusted external schemas
  • Detecting keys that shadow built-in JavaScript names
  • Producing a local audit report for review
  • Replacing the unreliable obj.hasOwnProperty pattern

Requirements

  • n8n 2.48.7 with Manual Trigger, Code, If, Set, Merge and NoOp nodes
  • Node runtime supporting Object.hasOwn (safe fallback included)
  • A real source emitting { recordId, payloadJson } to replace the sample node
  • Sensitive-name list and fail/warn policy edited inside Audit Own Properties

Setup and testing in n8n

  1. Import the JSON and click Execute Workflow
  2. Confirm Build Audit Report emits exactly one item
  3. Check recordsAudited=4, accepted=1, flagged=3, totalFindings=6, failFindings=3
  4. Inspect REC-001: four findings including constructor, toString, valueOf and hasOwnProperty
  5. Inspect REC-003: inputValid=false, reason 'payloadJson missing or not a string'
  6. Add a syntactically broken payloadJson and confirm reason 'payloadJson is not valid JSON'

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code If Set Merge No Op

Details

Trigger Manual trigger
Nodes 9
Apps 6
Views 59
Downloads 6

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (9)

/

Manual Trigger

Manual Trigger

#1

Load Sample Records

Code

#2

Audit Own Properties

Code

#3

If Passed

If

#4

Mark Accepted

Set

#5

Mark Needs Review

Set

#6

Merge Branches

Merge

#7

Build Audit Report

Code

#8

Report Ready

No Op

#9

Sticky Input

Sticky Note

#10

Sticky Audit

Sticky Note

#11

Sticky Routing

Sticky Note

#12

Sticky Report

Sticky Note

#13
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime