Shadowed Own-Property Ownership Auditor with Safe Access Report
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.Manual Trigger emits one empty item
- 2.Load Sample Records emits four demo records shaped as { recordId, payloadJson }
- 3.Audit Own Properties parses the string with JSON.parse and flags missing or invalid payloads
- 4.Recursive scan (depth 12, cycle guard) logs path, name, type, own, severity and reason
- 5.failCount, warnCount and passed are computed per record
- 6.If Passed routes to Mark Accepted or Mark Needs Review with includeOtherFields
- 7.Merge Branches appends both branches into one stream
- 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
- Import the JSON and click Execute Workflow
- Confirm Build Audit Report emits exactly one item
- Check recordsAudited=4, accepted=1, flagged=3, totalFindings=6, failFindings=3
- Inspect REC-001: four findings including constructor, toString, valueOf and hasOwnProperty
- Inspect REC-003: inputValid=false, reason 'payloadJson missing or not a string'
- 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
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (9)
Manual Trigger
Manual Trigger
Load Sample Records
Code
Audit Own Properties
Code
If Passed
If
Mark Accepted
Set
Mark Needs Review
Set
Merge Branches
Merge
Build Audit Report
Code
Report Ready
No Op
Sticky Input
Sticky Note
Sticky Audit
Sticky Note
Sticky Routing
Sticky Note
Sticky Report
Sticky Note
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