🌿
Hedge Β· security architecture diff

local

Hedge surfaced 2 evidence-linked risk(s) using deterministic analysis. Model reasoning was skipped because no API key was supplied.
2 active risks Β· HIGH
Surface nodes
11
Architecture changes
3
Critical / high
2
Medium
0
Evidence records
3
Analysis
deterministic-only

What changed

+2 security-relevant node(s)
+1 attack-surface edge(s)

Analysis integrity

Boundary
Held
Instruction-like content
Not observed
Offline analysis mode: repository content was parsed as data and no model call was made.

Highest-value findings

New mutating entry point has no detected authentication control
highHEDGE-001open90% confidence
An unauthenticated actor may invoke a state-changing operation.
Public user→POST /api/files/upload→Privileged application operation
Security invariantOnly authenticated and authorized principals may invoke POST /api/files/upload.
Missing controlsVerified authentication, Authorization scoped to the target resource
Evidence
app/api/files/upload/route.ts:4
New storage write crosses a trust boundary without complete upload controls
highHEDGE-002open90% confidence
Unexpected content, oversized payloads, or cross-tenant object writes may reach privileged storage.
External user→POST /api/files/upload→Storage write
Security invariantUploaded content must be authenticated, tenant-scoped, type-checked, and bounded before storage.
Missing controlsVerified authentication, Payload or file size limit, Object ownership constraint
Evidence
app/api/files/upload/route.ts:4app/api/files/upload/route.ts:13
New mutating entry point has no detected authentication control
highHEDGE-001open90% confidence
An unauthenticated actor may invoke a state-changing operation.
Public user→POST /api/files/upload→Privileged application operation
Security invariantOnly authenticated and authorized principals may invoke POST /api/files/upload.
Missing controlsVerified authentication, Authorization scoped to the target resource
Evidence
app/api/files/upload/route.ts:4
New storage write crosses a trust boundary without complete upload controls
highHEDGE-002open90% confidence
Unexpected content, oversized payloads, or cross-tenant object writes may reach privileged storage.
External user→POST /api/files/upload→Storage write
Security invariantUploaded content must be authenticated, tenant-scoped, type-checked, and bounded before storage.
Missing controlsVerified authentication, Payload or file size limit, Object ownership constraint
Evidence
app/api/files/upload/route.ts:4app/api/files/upload/route.ts:13

Evidence-linked attack surface

public2
entrypoint
GET /api/notes
entrypoint
POST /api/files/upload
application2
auth-control
Authentication check: auth
authorization-control
Resource ownership constraint
privileged0
No nodes
data4
data-model
Note
data-model
User
database
Database read: note.findMany
storage
Storage write
external3
dependency
@aws-sdk/client-s3@^3.0.0
dependency
next@16.0.0
dependency
prisma@^6.0.0

Security-relevant relationships

POST /api/files/upload
Storage write
Storage write
GET /api/notes
authorizes
Resource ownership constraint
GET /api/notes
Database read: note.findMany
Database read: note.findMany
Database read: note.findMany
Database read: note.findMany
Note
GET /api/notes
authenticates
Authentication check: auth

Limitations

  • GPT-5.6 architectural interpretation was not run.

Repository uncertainty

  • Sensitive assets were not confirmed in .hedge/context.yml.
  • Internet-facing deployment surfaces were not confirmed in .hedge/context.yml.
  • Authentication mechanisms were inferred from code and not confirmed in .hedge/context.yml.
  • Privileged roles were not confirmed in .hedge/context.yml.
  • Trusted external services were not confirmed in .hedge/context.yml.

Machine-readable report