[scan] Security attack vector mapping #5
Labels
No labels
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
-
Dependencies
No dependencies set.
Reference: core/go-html#5
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Map every external input entry point: function, file:line, input source, flows into, validation, attack vector.
Implementation Plan (Spark)
[scan] Security attack vector mapping — implementation plan
1) Files to scan
codegen/codegen.gocmd/codegen/main.gocmd/wasm/register.gocmd/wasm/main.gocontext.golayout.gonode.gopath.gopipeline.goresponsive.gorender.go2) Scan focus
For each file, check:
3) Evidence format required for report
Use this exact row structure in findings:
file:line | input source | flows into | current validation | attack vectorUse one row per finding.
4) Report location
Write/update the report in the issue body itself (preferred), and also persist the working draft at:
./SECURITY-ATTACK-VECTOR-MAPPING-PLAN.mdThen copy the table rows from this plan file into the issue body.
5) Mapping targets (entry points to enumerate)
codegen/codegen.go:34taginGenerateClass(tag, slot string)andslotin same functionwcTemplatepayloadstrings.Contains(tag, "-")codegen/codegen.go:53classNameinGenerateRegistration(tag, className string)andtagcustomElements.define("%s", %s)classNameis untrusted by function contractcodegen/codegen.go:57taginTagToClassName(tag)taggrammar, only string transformcodegen/codegen.go:71slotsmap inGenerateBundle(slots)(values are tags, keys are slots)GenerateClasscmd/codegen/main.go:163r io.Readercontent (stdin) as JSON mapjson.Unmarshal->GenerateBundle-> stdout JScmd/wasm/main.go:263slotsJSONargument tobuildComponentJSGenerateBundlecmd/wasm/register.go:208args[0]->varianthtml.NewLayout(variant)and layout renderingcmd/wasm/register.go:211args[1]->ctx.Localehtml.Contextpassed into rendering pipelinecmd/wasm/register.go:217args[2]objectslotsvalues forH/L/C/R/Fhtml.Raw(content.String())thenlayout.Renderoutputcmd/wasm/register.go:260slotsobject keysH/L/C/R/Fcontext.go:7Context.Data map[string]anyandContext.EntitlementsEntitled/Text/custom predicateslayout.go:60variantinNewLayout(variant)Layout.Renderlayout.go:68nodesinLayout.H/L/C/R/Flayout.go:104ctxand layout slot contentsclone.path)node.go:59contentinRaw(content string)n.contentwithout escapingnode.go:76tagandchildreninEl(tag, children...)escapeHTMLon tag stringnode.go:86key,value, wrappernodeinAttr(n, key, value)elNode.Rendernode.go:150key,argsinText(key, args...)escapeHTMLnode.go:172condfunction inIf(cond, node)cond/nodederef risk if caller passes nilnode.go:191condfunction inUnless(cond, node)node.go:211featureinEntitled(feature, node)node.go:230selectorfunction andcases mapinSwitchnode.go:250items(iter.Seq) andfninEach/EachSeqpath.go:418idinParseBlockIDpipeline.go:448htmlinStripTagspipeline.go:482node,ctxinImprintpipeline.go:495r,ctxinCompareVariantsImprint()calls and similarity mapresponsive.go:551name,layoutinVariantlayoutcauses panic in render; unvalidated name can be abused for very large outputsresponsive.go:557ctx+ list of variants inResponsive.Renderdata-variantand renders each layoutrender.go:523node,ctxinRenderNewContext6) Execution plan for Codex
Raw()andrenderToStringslot paths as high-priority findings by default.Security Scan: Attack Vector Map completed. Details in agent log.