MCPcopy Create free account
hub / github.com/diillson/chatcli / NewInlineCodeRiskAnalyzer

Function NewInlineCodeRiskAnalyzer

cli/agent/inline_code_classifier.go:216–219  ·  view source on GitHub ↗

NewInlineCodeRiskAnalyzer builds the default analyzer. Pass strict=true to elevate RiskUnknown to RiskHigh, useful for compliance-sensitive deployments. The environment variable CHATCLI_AGENT_INLINE_CODE_STRICT also forces strict mode.

()

Source from the content-addressed store, hash-verified

214// deployments. The environment variable CHATCLI_AGENT_INLINE_CODE_STRICT
215// also forces strict mode.
216func NewInlineCodeRiskAnalyzer() *InlineCodeRiskAnalyzer {
217 strict := strings.EqualFold(os.Getenv(inlineCodeStrictEnv), "true")
218 return &InlineCodeRiskAnalyzer{strict: strict}
219}
220
221// Analyze returns the risk level for the given inline source string.
222// `lang` should be a normalized interpreter name (python, node, perl,

Calls

no outgoing calls