Skip to content

Commit 966030c

Browse files
Deprecate and remove protopollution module (#26)
This change removes the `protopollution` analysis module, adapter, and all associated configuration and task definitions, as its functionality has been subsumed by the `taint` analysis module. Changes: - Removed `internal/analysis/active/protopollution` directory. - Removed `internal/worker/adapters/proto_adapter.go` and its test. - Updated `internal/config/config.go` and `config.example.yaml` to remove `protopollution` settings. - Updated `api/schemas/tasks.go` to remove `TaskAnalyzeWebPageProtoPP` task type. - Updated `internal/agent/models.go` to remove `ActionAnalyzeProtoPollution`. - Updated `internal/worker/worker.go` to remove adapter registration. - Updated `internal/agent/analysis_executor.go` and `internal/discovery/engine.go` to remove dispatch logic. - Updated relevant tests to reflect the removal. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 6ecad90 commit 966030c

15 files changed

Lines changed: 9 additions & 1246 deletions

File tree

api/schemas/tasks.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ package schemas
88
type TaskType string
99

1010
const (
11-
TaskAgentMission TaskType = "AGENT_MISSION" // A high-level mission for the autonomous agent.
12-
TaskAnalyzeWebPageTaint TaskType = "ANALYZE_WEB_PAGE_TAINT" // Performs taint analysis on a web page.
13-
TaskAnalyzeWebPageProtoPP TaskType = "ANALYZE_WEB_PAGE_PROTOPP" // Checks for prototype pollution vulnerabilities.
14-
TaskTestRaceCondition TaskType = "TEST_RACE_CONDITION" // Tests for race conditions in web applications.
15-
TaskTestAuthATO TaskType = "TEST_AUTH_ATO" // Tests for account takeover vulnerabilities.
11+
TaskAgentMission TaskType = "AGENT_MISSION" // A high-level mission for the autonomous agent.
12+
TaskAnalyzeWebPageTaint TaskType = "ANALYZE_WEB_PAGE_TAINT" // Performs taint analysis on a web page.
13+
TaskTestRaceCondition TaskType = "TEST_RACE_CONDITION" // Tests for race conditions in web applications.
14+
TaskTestAuthATO TaskType = "TEST_AUTH_ATO" // Tests for account takeover vulnerabilities.
1615
TaskTestAuthIDOR TaskType = "TEST_AUTH_IDOR" // Tests for Insecure Direct Object References.
1716
TaskAnalyzeHeaders TaskType = "ANALYZE_HEADERS" // Analyzes HTTP security headers.
1817
TaskAnalyzeJWT TaskType = "ANALYZE_JWT" // Analyzes JSON Web Tokens for vulnerabilities.

config.example.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ scanners:
8888
enabled: true
8989
depth: 3
9090
concurrency: 2
91-
protopollution:
92-
enabled: true
93-
wait_duration: "8s"
9491
timeslip:
9592
enabled: true
9693
request_count: 25

internal/agent/analysis_executor.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ func (e *AnalysisExecutor) mapActionToTaskType(actionType ActionType) (schemas.T
185185
switch actionType {
186186
case ActionAnalyzeTaint:
187187
return schemas.TaskAnalyzeWebPageTaint, nil
188-
case ActionAnalyzeProtoPollution:
189-
return schemas.TaskAnalyzeWebPageProtoPP, nil
190188
case ActionAnalyzeHeaders:
191189
return schemas.TaskAnalyzeHeaders, nil
192190
case ActionTestRaceCondition:

internal/agent/analysis_executor_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ func TestAnalysisExecutor_MapActionToTaskType(t *testing.T) {
264264
expectErr bool
265265
}{
266266
{ActionAnalyzeTaint, schemas.TaskAnalyzeWebPageTaint, false},
267-
{ActionAnalyzeProtoPollution, schemas.TaskAnalyzeWebPageProtoPP, false},
268267
{ActionAnalyzeHeaders, schemas.TaskAnalyzeHeaders, false},
269268
{ActionClick, "", true}, // Unsupported type
270269
}

internal/agent/executors.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func NewExecutorRegistry(projectRoot string, globalCtx *core.GlobalContext) *Exe
8181
// Register analysis actions (Updated to include all defined actions).
8282
r.register(analysisExec,
8383
ActionAnalyzeTaint,
84-
ActionAnalyzeProtoPollution,
8584
ActionAnalyzeHeaders,
8685
ActionAnalyzeJWT,
8786
ActionTestRaceCondition,

internal/agent/models.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ const (
5353

5454
// -- Security Analysis Actions (Active & IAST) --
5555
// These actions involve injecting payloads, manipulating the environment, or analyzing the live state.
56-
ActionAnalyzeTaint ActionType = "ANALYZE_TAINT" // (IAST/Taint) Taint analysis (XSS, Injection) on the current page state.
57-
ActionAnalyzeProtoPollution ActionType = "ANALYZE_PROTO_POLLUTION" // (Active/Proto) Scans for client-side prototype pollution and DOM clobbering.
58-
ActionTestRaceCondition ActionType = "TEST_RACE_CONDITION" // (Active/TimeSlip) Tests an endpoint for race conditions (TOCTOU).
56+
ActionAnalyzeTaint ActionType = "ANALYZE_TAINT" // (IAST/Taint) Taint analysis (XSS, Injection) on the current page state.
57+
ActionTestRaceCondition ActionType = "TEST_RACE_CONDITION" // (Active/TimeSlip) Tests an endpoint for race conditions (TOCTOU).
5958

6059
// -- Authentication & Authorization Testing --
6160
ActionTestATO ActionType = "TEST_ATO" // (Active/ATO) Account Takeover: Tests login endpoints for credential stuffing/enumeration.

internal/analysis/active/protopollution/analyze/proto_analyzer.go

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)