Skip to content

Commit

Permalink
Add script hash to flow
Browse files Browse the repository at this point in the history
Fixes #123
  • Loading branch information
sohomdatta1 committed Feb 11, 2025
1 parent 2274538 commit 938669a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions post-processor/flow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var scriptFlowFields = [...]string{
"isolate",
"visiblev8",
"code",
"sha256",
"url",
"evaled_by",
"apis",
Expand Down Expand Up @@ -131,6 +132,7 @@ func (agg *flowAggregator) DumpToPostgresql(ctx *core.AggregationContext, sqlDb
script.info.Isolate.ID,
script.info.VisibleV8,
script.info.Code,
script.info.CodeHash.SHA2[:],
script.info.URL,
evaledById,
pq.Array(script.APIs),
Expand Down
1 change: 1 addition & 0 deletions post-processor/postgres_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ CREATE TABLE IF NOT EXISTS script_flow (
isolate TEXT NOT NULL, -- V8 isolate pointer
visiblev8 BOOLEAN NOT NULL, -- Is the script loaded by the browser/injected by VisibleV8 (in most cases you want to ignore scripts if this is true)
code TEXT NOT NULL,
sha256 BYTEA,
first_origin TEXT,
url TEXT,
apis TEXT[] NOT NULL, -- All APIs loaded by a script in the order they were executed
Expand Down

0 comments on commit 938669a

Please sign in to comment.