Class: Scryer::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/scryer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



42
43
44
45
# File 'lib/scryer.rb', line 42

def initialize
  @dirs = Scryer::Scanner::DEFAULT_GLOB_DIRS
  @skip_rules = []
end

Instance Attribute Details

#ai_clientObject

branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main").

ai_client, when set, opts into rewriting every finding's suggested_fix via an LLM (see README's "AI-assisted fix suggestions") — any object or Proc responding to #call(prompt) (or #complete(prompt)). nil by default: off, no network calls, no provider assumed.

skip_rules silences specific checks by rule_id (e.g. a known false positive on this codebase) without editing/removing the rule itself — strings or symbols, matched against each Rule's rule_id. Empty by default: every registered rule runs. The scryer executable's --skip RULE_ID flag adds to this list for a single run rather than replacing it.



40
41
42
# File 'lib/scryer.rb', line 40

def ai_client
  @ai_client
end

#branchObject

branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main").

ai_client, when set, opts into rewriting every finding's suggested_fix via an LLM (see README's "AI-assisted fix suggestions") — any object or Proc responding to #call(prompt) (or #complete(prompt)). nil by default: off, no network calls, no provider assumed.

skip_rules silences specific checks by rule_id (e.g. a known false positive on this codebase) without editing/removing the rule itself — strings or symbols, matched against each Rule's rule_id. Empty by default: every registered rule runs. The scryer executable's --skip RULE_ID flag adds to this list for a single run rather than replacing it.



40
41
42
# File 'lib/scryer.rb', line 40

def branch
  @branch
end

#dirsObject

branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main").

ai_client, when set, opts into rewriting every finding's suggested_fix via an LLM (see README's "AI-assisted fix suggestions") — any object or Proc responding to #call(prompt) (or #complete(prompt)). nil by default: off, no network calls, no provider assumed.

skip_rules silences specific checks by rule_id (e.g. a known false positive on this codebase) without editing/removing the rule itself — strings or symbols, matched against each Rule's rule_id. Empty by default: every registered rule runs. The scryer executable's --skip RULE_ID flag adds to this list for a single run rather than replacing it.



40
41
42
# File 'lib/scryer.rb', line 40

def dirs
  @dirs
end

#project_nameObject

branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main").

ai_client, when set, opts into rewriting every finding's suggested_fix via an LLM (see README's "AI-assisted fix suggestions") — any object or Proc responding to #call(prompt) (or #complete(prompt)). nil by default: off, no network calls, no provider assumed.

skip_rules silences specific checks by rule_id (e.g. a known false positive on this codebase) without editing/removing the rule itself — strings or symbols, matched against each Rule's rule_id. Empty by default: every registered rule runs. The scryer executable's --skip RULE_ID flag adds to this list for a single run rather than replacing it.



40
41
42
# File 'lib/scryer.rb', line 40

def project_name
  @project_name
end

#skip_rulesObject

branch, when set, overrides the git_branch value recorded in the report (instead of the actual checked-out branch from git rev-parse --abbrev-ref HEAD) — set this when the branch you want tracked isn't necessarily the one the scan happens to run on (e.g. a CI runner in detached-HEAD state, or you always want releases attributed to "main").

ai_client, when set, opts into rewriting every finding's suggested_fix via an LLM (see README's "AI-assisted fix suggestions") — any object or Proc responding to #call(prompt) (or #complete(prompt)). nil by default: off, no network calls, no provider assumed.

skip_rules silences specific checks by rule_id (e.g. a known false positive on this codebase) without editing/removing the rule itself — strings or symbols, matched against each Rule's rule_id. Empty by default: every registered rule runs. The scryer executable's --skip RULE_ID flag adds to this list for a single run rather than replacing it.



40
41
42
# File 'lib/scryer.rb', line 40

def skip_rules
  @skip_rules
end