Aalexbit-codemod

continue-privacy-mining

Mine Continue's five critical privacy/security anti-patterns and emit continue_privacy_risk_finding metrics

miningmetricsprivacycontinueragautonomous-tools
Public
0 executions

Run locally

npx codemod continue-privacy-mining

continue-privacy-mining

Read-only mining codemod for Continue. It detects the five critical privacy/security anti-patterns identified for Continue and emits one continue_privacy_risk_finding metric row per match. Source files are never modified.

Critical rules detected

Rule IDAnti-patternWhat it finds
RAG-001scope_filter_gapFTS directory param defined but unused in SQL builder
RAG-002scope_filter_gaplance_db_cache hydrated by UUID without artifact_id
RAG-003scope_filter_gapcode_snippets fetched by ID without tag join
TOOL-002autonomous_tool_executionEdit tools hardcoded to allowedWithoutPermission
TOOL-020autonomous_tool_executionretrieveWithTools() calls callBuiltInTool() without policy gate

Metric

Name: continue_privacy_risk_finding

Each row includes:

LabelTierExample
anti_patternL1scope_filter_gap
severityL1critical
autonomousL1true
rule_idL2TOOL-002
categoryL2policy-bypass
risk_tierL2autonomous-write
execution_surfaceL2gui-agent
fileL3core/indexing/LanceDbIndex.ts
lineL3478
symbolL3retrieve
tool_nameL3none

Usage

Run against a Continue checkout:

bash

Run the JSSG script directly:

bash

Test

bash

Expected hits in upstream Continue

RuleFile
RAG-001core/indexing/FullTextSearchCodebaseIndex.ts
RAG-002core/indexing/LanceDbIndex.ts
RAG-003core/indexing/CodeSnippetsIndex.ts
TOOL-002gui/src/redux/thunks/evaluateToolPolicies.ts
TOOL-020core/context/retrieval/pipelines/BaseRetrievalPipeline.ts

Ready to contribute?

Build your own codemod and share it with the community.