Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVIDIA/SkillSpector
/ functions
Functions
2,044 in github.com/NVIDIA/SkillSpector
⨍
Functions
2,044
◇
Types & classes
379
↳
Endpoints
141
↓ 7 callers
Method
_validate_url_host
Validate URL host against allowlist and SSRF protections. Returns the hostname on success, raises ValueError on blocked URLs.
src/skillspector/input_handler.py:171
↓ 7 callers
Method
collect_findings
Flatten per-batch results into a single :class:`Finding` list. Intended for discovery-mode analyzers where :meth:`parse_response` ret
src/skillspector/llm_analyzer_base.py:451
↓ 7 callers
Function
create_chat_model
Create the active provider's native LangChain chat model. CLI providers (``claude_cli``, ``codex_cli``, ``gemini_cli``) do not have a native
src/skillspector/providers/__init__.py:172
↓ 7 callers
Method
get_max_output_tokens
(self, model: str)
src/skillspector/providers/base.py:56
↓ 7 callers
Function
is_code_example
Return True when the context appears to be a code example or documentation snippet.
src/skillspector/nodes/analyzers/common.py:60
↓ 7 callers
Function
is_language_compatible
Return ``True`` when *rule_id* is reliable for *detected_language*. Code-level rules are always compatible. Semantic rules are always compat
contrib/multilingual/annotation.py:73
↓ 7 callers
Method
to_dict
Return a JSON-serializable dict representation (full finding shape).
src/skillspector/models.py:86
↓ 7 callers
Function
validate_sarif_report
Validate that data has the minimal SARIF 2.1.0 structure. Raises ValidationError if invalid.
src/skillspector/sarif_models.py:181
↓ 6 callers
Method
_clone_git
Clone a Git repository to a temporary directory.
src/skillspector/input_handler.py:193
↓ 6 callers
Method
_download_file
Download a file from URL to a temporary directory.
src/skillspector/input_handler.py:219
↓ 6 callers
Function
_format_manifest
Format manifest dict into a readable string for the prompt.
src/skillspector/nodes/analyzers/semantic_developer_intent.py:135
↓ 6 callers
Method
_make_request
Create a transport and capture the rewritten request. Returns the rewritten httpx.Request and the decoded body.
tests/unit/test_anthropic_proxy_provider.py:119
↓ 6 callers
Function
_parse_codex_output
Extract assistant text from ``codex exec --json`` JSONL output. Verified against codex 0.139.0, whose final message arrives nested:: {"t
src/skillspector/providers/_agent_cli.py:322
↓ 6 callers
Function
_rule_ids
(text: str)
tests/nodes/analyzers/test_static_patterns_anti_refusal.py:31
↓ 6 callers
Method
build_prompt
Build the LLM prompt for a single batch. The default wraps :attr:`base_prompt` with line-numbered file content so the LLM can referen
src/skillspector/llm_analyzer_base.py:339
↓ 6 callers
Function
chat_completion
Request a single chat completion and return the assistant content. Routes through :func:`get_chat_model`, which dispatches to the CLI adapter
src/skillspector/llm_utils.py:265
↓ 6 callers
Function
chunk_file_by_lines
Split *content* into line-range chunks that each fit within *max_tokens*. Returns a list of ``(chunk_text, start_line, end_line)`` tuples where l
src/skillspector/llm_analyzer_base.py:154
↓ 6 callers
Function
create_api_key_pool_from_env
Build an :class:`ApiKeyPool` from environment variables. Reads ``SKILLSPECTOR_API_KEYS`` — a newline- or semicolon-delimited list of ``key|ba
contrib/multilingual/api_pool.py:552
↓ 6 callers
Method
get_context_length
(self, model: str)
src/skillspector/providers/base.py:54
↓ 6 callers
Method
invoke
(self, prompt: str)
src/skillspector/llm_utils.py:219
↓ 6 callers
Method
is_available
Return whether the analyzer can run in current environment.
src/skillspector/models.py:123
↓ 6 callers
Function
is_llm_available
Return ``(available, error_message)`` describing LLM availability. For CLI providers (``claude_cli``, ``codex_cli``, ``gemini_cli``) the check
src/skillspector/llm_utils.py:84
↓ 6 callers
Function
number_lines
Prefix each line with its 1-indexed line number (e.g. ``L1:``, ``L2:``). For chunks, *start_line* offsets the numbering so the LLM sees real file
src/skillspector/llm_analyzer_base.py:206
↓ 6 callers
Function
partition_findings
Split *findings* into (kept, suppressed) using *baseline*. With no baseline, everything is kept. Suppressed findings never count toward the r
src/skillspector/suppression.py:226
↓ 6 callers
Method
reason_for
Return the suppression reason for *finding*, or None if not suppressed.
src/skillspector/suppression.py:150
↓ 6 callers
Function
resolve_dotted_name
Build a dotted name string from a Name or Attribute node. Examples: ``ast.Name(id='exec')`` → ``'exec'``, ``ast.Attribute(value=Name('os'), a
src/skillspector/nodes/analyzers/common.py:87
↓ 6 callers
Function
run_static_patterns
Run one or more pattern modules over state components/file_cache. For each path in state["components"], loads content from state["file_cache
src/skillspector/nodes/analyzers/static_runner.py:225
↓ 6 callers
Function
set_api_pool
Replace the LLM chat-model factory with a pooled version. When *pool* is set, every call to :func:`skillspector.llm_utils.get_chat_model` ret
contrib/multilingual/runner.py:58
↓ 6 callers
Method
with_structured_output
(self, schema: type)
src/skillspector/llm_utils.py:230
↓ 5 callers
Function
_build_file_cache
(skill_dir: Path)
tests/nodes/analyzers/test_semantic_developer_intent.py:366
↓ 5 callers
Function
_clean_text
Strip ANSI escape sequences and disallowed control chars (keep tab/newline).
src/skillspector/nodes/report.py:92
↓ 5 callers
Function
_extract_json_object
Extract a single JSON object from a CLI model's text response. Tolerates markdown code fences and surrounding prose. Raises ``ValueError`` (f
src/skillspector/llm_utils.py:126
↓ 5 callers
Method
_extract_zip
Extract a zip file to a temporary directory with path traversal protection.
src/skillspector/input_handler.py:243
↓ 5 callers
Function
_finding
( rule_id: str, start_line: int, end_line: int | None = None, severity: str = "CRITICAL", )
tests/nodes/test_meta_analyzer.py:46
↓ 5 callers
Function
_format_findings_for_prompt
Format findings for the per-file prompt (no per-finding truncation).
src/skillspector/nodes/meta_analyzer.py:202
↓ 5 callers
Function
_in_range
(cp: int, r: tuple[int, int])
contrib/multilingual/detection.py:46
↓ 5 callers
Function
_llm_item
(rule_id: str, start_line: int, **kw: object)
tests/nodes/test_meta_analyzer.py:63
↓ 5 callers
Function
_load_manifest
Extract YAML frontmatter from SKILL.md as a manifest dict.
tests/nodes/analyzers/test_semantic_developer_intent.py:384
↓ 5 callers
Method
_make_finding
(self, line: int, file: str = "test.py")
tests/nodes/test_llm_analyzer_base.py:116
↓ 5 callers
Function
_make_vuln
( vuln_id: str = "GHSA-1234", summary: str = "test vuln", severity: str = "HIGH", aliases: tup
tests/unit/test_patterns_new.py:60
↓ 5 callers
Function
_parse_claude_output
Return the assistant text from ``claude -p --output-format text`` stdout. With ``--output-format text`` the claude CLI writes only the response t
src/skillspector/providers/_agent_cli.py:243
↓ 5 callers
Method
_recover_expired_keys
Promote rate-limited keys whose backoff has expired.
contrib/multilingual/api_pool.py:358
↓ 5 callers
Function
_sanitize_meta_finding
Fix common LLM output quirks that break downstream consumers.
contrib/multilingual/runner.py:168
↓ 5 callers
Function
analyzer_finding_to_finding
Convert an AnalyzerFinding (from any analyzer) to graph-state Finding.
src/skillspector/nodes/analyzers/static_runner.py:194
↓ 5 callers
Function
create_graph
Create and compile Skillspector workflow graph.
src/skillspector/graph.py:34
↓ 5 callers
Function
ctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_prompt_injection.py:166
↓ 5 callers
Function
ctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_data_exfiltration.py:129
↓ 5 callers
Function
findings_in_range
Return findings whose ``start_line`` falls within [start_line, end_line].
src/skillspector/llm_analyzer_base.py:197
↓ 5 callers
Function
get_max_output_tokens
Output token budget for *model*. Uses the smaller of the percentage-based budget and any explicit ``max_output_tokens`` cap exposed by the pr
src/skillspector/model_info.py:61
↓ 5 callers
Function
load_baseline
Load a baseline file (YAML or JSON) into a :class:`Baseline`. Raises FileNotFoundError if *path* is missing, ValueError if it is malformed.
src/skillspector/suppression.py:209
↓ 5 callers
Function
loc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_prompt_injection.py:163
↓ 5 callers
Function
loc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_data_exfiltration.py:126
↓ 5 callers
Function
loc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_privilege_escalation.py:120
↓ 5 callers
Method
parse_response
Parse the LLM response for a single batch. The default converts each :class:`LLMFinding` to a :class:`Finding` via :meth:`LLMFinding.
src/skillspector/llm_analyzer_base.py:353
↓ 5 callers
Function
resolve_input
Resolve input to a scannable directory. - If state has non-empty input_path: resolve it (Git URL, file URL, zip, file, or directory) a
src/skillspector/nodes/resolve_input.py:34
↓ 5 callers
Function
run_scan
Invoke the SkillSpector graph and return a structured verdict. Args: target: Git URL, file URL, ``.zip``, ``.md`` file, or local director
src/skillspector/mcp_server.py:49
↓ 5 callers
Function
sorted_results
Return *results* sorted by risk score descending.
contrib/multilingual/reports.py:33
↓ 4 callers
Function
_analyzer
()
tests/nodes/test_meta_analyzer.py:41
↓ 4 callers
Function
_assert_all_restored
Assert all 5 method references are restored (== originals).
contrib/multilingual/tests/test_monkeypatch_invasiveness.py:103
↓ 4 callers
Function
_clamp
(value: float, lo: float = 0.0, hi: float = 1.0)
src/skillspector/nodes/analyzers/mcp_least_privilege.py:199
↓ 4 callers
Function
_classify
(name: str, categories: list[tuple[frozenset[str], str]], default: str)
src/skillspector/nodes/analyzers/behavioral_taint_tracking.py:192
↓ 4 callers
Function
_degr_state
(**overrides: object)
tests/nodes/test_meta_analyzer.py:251
↓ 4 callers
Function
_find_line
Return 1-based line number for character position *pos*.
src/skillspector/nodes/analyzers/mcp_rug_pull.py:75
↓ 4 callers
Function
_force_restore
Safety-net: restore all patches regardless of depth counter state. Call in tearDown / tearDownClass to prevent test-order leakage when random
contrib/multilingual/tests/test_monkeypatch_invasiveness.py:113
↓ 4 callers
Function
_get_api_version
Return the ``anthropic_version`` value from env or the default.
src/skillspector/providers/anthropic_proxy/provider.py:63
↓ 4 callers
Method
_get_temp_dir
Get or create a temporary directory for this session.
src/skillspector/input_handler.py:138
↓ 4 callers
Function
_is_documentation_example
(context: str, file_type: str)
src/skillspector/nodes/analyzers/static_patterns_privilege_escalation.py:224
↓ 4 callers
Function
_meta_from_json_report
Run the report node in JSON mode and return the metadata block.
tests/nodes/test_report.py:653
↓ 4 callers
Function
_normalize_string_list
Strip and lowercase all strings in the list. Returns sorted list of unique values.
src/skillspector/nodes/analyzers/mcp_rug_pull.py:80
↓ 4 callers
Function
_run_bounded
Drive *proc* to completion with memory and time bounds. Feeds *prompt_bytes* to stdin and drains stdout/stderr concurrently (so a large promp
src/skillspector/providers/_agent_cli.py:628
↓ 4 callers
Function
_select_active_provider
Construct the active provider based on ``SKILLSPECTOR_PROVIDER``.
src/skillspector/providers/__init__.py:76
↓ 4 callers
Function
apply_import_aliases
Rewrite a resolved call name to its fully-qualified form using import aliases. Bridges several evasion-prone spellings back to the canonical name
src/skillspector/nodes/analyzers/common.py:127
↓ 4 callers
Function
baseline_from_dict
Build a :class:`Baseline` from a parsed mapping (YAML/JSON).
src/skillspector/suppression.py:165
↓ 4 callers
Method
build_prompt
Build the LLM prompt for a single batch. Delegates to the parent's :meth:`build_prompt`, which wraps the analyzer prompt with line-nu
contrib/multilingual/gap_fill.py:195
↓ 4 callers
Method
build_prompt
(self, batch: Batch, **kwargs: object)
src/skillspector/nodes/meta_analyzer.py:331
↓ 4 callers
Function
create_openai_compatible_chat_model
Create ``ChatOpenAI`` for providers serving OpenAI-compatible endpoints.
src/skillspector/providers/chat_models.py:53
↓ 4 callers
Function
ctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_excessive_agency.py:166
↓ 4 callers
Function
ctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_tool_misuse.py:209
↓ 4 callers
Function
get_max_input_tokens
Input token budget for *model* (75 %% of context window).
src/skillspector/model_info.py:56
↓ 4 callers
Function
get_remediation
Get default remediation for a pattern ID.
src/skillspector/nodes/analyzers/pattern_defaults.py:400
↓ 4 callers
Function
loc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_excessive_agency.py:163
↓ 4 callers
Function
loc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_tool_misuse.py:206
↓ 4 callers
Method
record_retry_success
Increment the retry-success counter for reporting. Only call this when a retry (after a key switch due to 429) actually succeeds, not
contrib/multilingual/api_pool.py:302
↓ 4 callers
Function
resolveMaybePath
(ctxCwd: string, value?: string)
extensions/skillspector.ts:33
↓ 4 callers
Method
run_batches
Execute LLM calls for all *batches*, returning per-batch parsed results. The element type of the inner list depends on the subclass: the defa
src/skillspector/llm_analyzer_base.py:368
↓ 4 callers
Method
snapshot
Return a snapshot dict suitable for report metadata.
contrib/multilingual/api_pool.py:339
↓ 4 callers
Method
try_acquire
Non-blocking acquire — returns a key immediately or ``None``. Unlike :meth:`acquire`, this never blocks. If a slot is available righ
contrib/multilingual/api_pool.py:239
↓ 3 callers
Function
_apply_patches
Apply all 7 compatibility patches (idempotent — safe to nest). Uses a nesting counter instead of a boolean flag so that nested ``with deepsee
contrib/multilingual/runner.py:477
↓ 3 callers
Function
_cache_key
(name: str, version: str | None, ecosystem: str)
src/skillspector/nodes/analyzers/osv_client.py:77
↓ 3 callers
Function
_chat_model_name
(llm: object)
tests/unit/test_llm_utils.py:348
↓ 3 callers
Function
_is_documentation_markdown
Return True for markdown files in documentation subdirectories (not SKILL.md).
src/skillspector/nodes/analyzers/static_runner.py:183
↓ 3 callers
Method
_is_git_url
Check if path is a Git repository URL.
src/skillspector/input_handler.py:144
↓ 3 callers
Function
_is_open_for_write
Heuristic: open() is a write sink if mode arg contains 'w' or 'a'.
src/skillspector/nodes/analyzers/behavioral_taint_tracking.py:216
↓ 3 callers
Function
_level_from_string
(level: str)
src/skillspector/logging_config.py:52
↓ 3 callers
Function
_llm_degradation_notice
Return a human-readable degraded-scan warning, or None if not degraded.
src/skillspector/nodes/report.py:439
↓ 3 callers
Function
_llm_runtime_status
Return ``(attempted, succeeded, degraded)`` from the LLM call log. ``degraded`` is True when the LLM stage was requested and at least one call
src/skillspector/nodes/report.py:424
↓ 3 callers
Function
_make_skill_spec_dir
Populate root with skill spec: SKILL.md, references/, scripts/, assets/.
tests/nodes/test_build_context.py:32
↓ 3 callers
Function
_match_glob
Case-insensitive glob match; ``**`` is treated as an alias for ``*``. Patterns use :func:`fnmatch.fnmatch` semantics, so ``*``, ``?`` and ``[...]
src/skillspector/suppression.py:72
↓ 3 callers
Function
_model_from_env
(name: str, default: str)
tests/provider/test_provider_endpoint.py:48
↓ 3 callers
Method
_next_available_in
Seconds until the earliest rate-limited key recovers, or ``None``.
contrib/multilingual/api_pool.py:368
← previous
next →
101–200 of 2,044, ranked by callers