MCPcopy Create free account

hub / github.com/NVIDIA/SkillSpector / functions

Functions2,044 in github.com/NVIDIA/SkillSpector

↓ 7 callersMethod_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 callersMethodcollect_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 callersFunctioncreate_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 callersMethodget_max_output_tokens
(self, model: str)
src/skillspector/providers/base.py:56
↓ 7 callersFunctionis_code_example
Return True when the context appears to be a code example or documentation snippet.
src/skillspector/nodes/analyzers/common.py:60
↓ 7 callersFunctionis_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 callersMethodto_dict
Return a JSON-serializable dict representation (full finding shape).
src/skillspector/models.py:86
↓ 7 callersFunctionvalidate_sarif_report
Validate that data has the minimal SARIF 2.1.0 structure. Raises ValidationError if invalid.
src/skillspector/sarif_models.py:181
↓ 6 callersMethod_clone_git
Clone a Git repository to a temporary directory.
src/skillspector/input_handler.py:193
↓ 6 callersMethod_download_file
Download a file from URL to a temporary directory.
src/skillspector/input_handler.py:219
↓ 6 callersFunction_format_manifest
Format manifest dict into a readable string for the prompt.
src/skillspector/nodes/analyzers/semantic_developer_intent.py:135
↓ 6 callersMethod_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 callersFunction_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 callersFunction_rule_ids
(text: str)
tests/nodes/analyzers/test_static_patterns_anti_refusal.py:31
↓ 6 callersMethodbuild_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 callersFunctionchat_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 callersFunctionchunk_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 callersFunctioncreate_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 callersMethodget_context_length
(self, model: str)
src/skillspector/providers/base.py:54
↓ 6 callersMethodinvoke
(self, prompt: str)
src/skillspector/llm_utils.py:219
↓ 6 callersMethodis_available
Return whether the analyzer can run in current environment.
src/skillspector/models.py:123
↓ 6 callersFunctionis_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 callersFunctionnumber_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 callersFunctionpartition_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 callersMethodreason_for
Return the suppression reason for *finding*, or None if not suppressed.
src/skillspector/suppression.py:150
↓ 6 callersFunctionresolve_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 callersFunctionrun_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 callersFunctionset_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 callersMethodwith_structured_output
(self, schema: type)
src/skillspector/llm_utils.py:230
↓ 5 callersFunction_build_file_cache
(skill_dir: Path)
tests/nodes/analyzers/test_semantic_developer_intent.py:366
↓ 5 callersFunction_clean_text
Strip ANSI escape sequences and disallowed control chars (keep tab/newline).
src/skillspector/nodes/report.py:92
↓ 5 callersFunction_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 callersMethod_extract_zip
Extract a zip file to a temporary directory with path traversal protection.
src/skillspector/input_handler.py:243
↓ 5 callersFunction_finding
( rule_id: str, start_line: int, end_line: int | None = None, severity: str = "CRITICAL", )
tests/nodes/test_meta_analyzer.py:46
↓ 5 callersFunction_format_findings_for_prompt
Format findings for the per-file prompt (no per-finding truncation).
src/skillspector/nodes/meta_analyzer.py:202
↓ 5 callersFunction_in_range
(cp: int, r: tuple[int, int])
contrib/multilingual/detection.py:46
↓ 5 callersFunction_llm_item
(rule_id: str, start_line: int, **kw: object)
tests/nodes/test_meta_analyzer.py:63
↓ 5 callersFunction_load_manifest
Extract YAML frontmatter from SKILL.md as a manifest dict.
tests/nodes/analyzers/test_semantic_developer_intent.py:384
↓ 5 callersMethod_make_finding
(self, line: int, file: str = "test.py")
tests/nodes/test_llm_analyzer_base.py:116
↓ 5 callersFunction_make_vuln
( vuln_id: str = "GHSA-1234", summary: str = "test vuln", severity: str = "HIGH", aliases: tup
tests/unit/test_patterns_new.py:60
↓ 5 callersFunction_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 callersMethod_recover_expired_keys
Promote rate-limited keys whose backoff has expired.
contrib/multilingual/api_pool.py:358
↓ 5 callersFunction_sanitize_meta_finding
Fix common LLM output quirks that break downstream consumers.
contrib/multilingual/runner.py:168
↓ 5 callersFunctionanalyzer_finding_to_finding
Convert an AnalyzerFinding (from any analyzer) to graph-state Finding.
src/skillspector/nodes/analyzers/static_runner.py:194
↓ 5 callersFunctioncreate_graph
Create and compile Skillspector workflow graph.
src/skillspector/graph.py:34
↓ 5 callersFunctionctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_prompt_injection.py:166
↓ 5 callersFunctionctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_data_exfiltration.py:129
↓ 5 callersFunctionfindings_in_range
Return findings whose ``start_line`` falls within [start_line, end_line].
src/skillspector/llm_analyzer_base.py:197
↓ 5 callersFunctionget_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 callersFunctionload_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 callersFunctionloc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_prompt_injection.py:163
↓ 5 callersFunctionloc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_data_exfiltration.py:126
↓ 5 callersFunctionloc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_privilege_escalation.py:120
↓ 5 callersMethodparse_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 callersFunctionresolve_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 callersFunctionrun_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 callersFunctionsorted_results
Return *results* sorted by risk score descending.
contrib/multilingual/reports.py:33
↓ 4 callersFunction_analyzer
()
tests/nodes/test_meta_analyzer.py:41
↓ 4 callersFunction_assert_all_restored
Assert all 5 method references are restored (== originals).
contrib/multilingual/tests/test_monkeypatch_invasiveness.py:103
↓ 4 callersFunction_clamp
(value: float, lo: float = 0.0, hi: float = 1.0)
src/skillspector/nodes/analyzers/mcp_least_privilege.py:199
↓ 4 callersFunction_classify
(name: str, categories: list[tuple[frozenset[str], str]], default: str)
src/skillspector/nodes/analyzers/behavioral_taint_tracking.py:192
↓ 4 callersFunction_degr_state
(**overrides: object)
tests/nodes/test_meta_analyzer.py:251
↓ 4 callersFunction_find_line
Return 1-based line number for character position *pos*.
src/skillspector/nodes/analyzers/mcp_rug_pull.py:75
↓ 4 callersFunction_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 callersFunction_get_api_version
Return the ``anthropic_version`` value from env or the default.
src/skillspector/providers/anthropic_proxy/provider.py:63
↓ 4 callersMethod_get_temp_dir
Get or create a temporary directory for this session.
src/skillspector/input_handler.py:138
↓ 4 callersFunction_is_documentation_example
(context: str, file_type: str)
src/skillspector/nodes/analyzers/static_patterns_privilege_escalation.py:224
↓ 4 callersFunction_meta_from_json_report
Run the report node in JSON mode and return the metadata block.
tests/nodes/test_report.py:653
↓ 4 callersFunction_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 callersFunction_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 callersFunction_select_active_provider
Construct the active provider based on ``SKILLSPECTOR_PROVIDER``.
src/skillspector/providers/__init__.py:76
↓ 4 callersFunctionapply_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 callersFunctionbaseline_from_dict
Build a :class:`Baseline` from a parsed mapping (YAML/JSON).
src/skillspector/suppression.py:165
↓ 4 callersMethodbuild_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 callersMethodbuild_prompt
(self, batch: Batch, **kwargs: object)
src/skillspector/nodes/meta_analyzer.py:331
↓ 4 callersFunctioncreate_openai_compatible_chat_model
Create ``ChatOpenAI`` for providers serving OpenAI-compatible endpoints.
src/skillspector/providers/chat_models.py:53
↓ 4 callersFunctionctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_excessive_agency.py:166
↓ 4 callersFunctionctx
(start: int)
src/skillspector/nodes/analyzers/static_patterns_tool_misuse.py:209
↓ 4 callersFunctionget_max_input_tokens
Input token budget for *model* (75 %% of context window).
src/skillspector/model_info.py:56
↓ 4 callersFunctionget_remediation
Get default remediation for a pattern ID.
src/skillspector/nodes/analyzers/pattern_defaults.py:400
↓ 4 callersFunctionloc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_excessive_agency.py:163
↓ 4 callersFunctionloc
(ln: int)
src/skillspector/nodes/analyzers/static_patterns_tool_misuse.py:206
↓ 4 callersMethodrecord_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 callersFunctionresolveMaybePath
(ctxCwd: string, value?: string)
extensions/skillspector.ts:33
↓ 4 callersMethodrun_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 callersMethodsnapshot
Return a snapshot dict suitable for report metadata.
contrib/multilingual/api_pool.py:339
↓ 4 callersMethodtry_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 callersFunction_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 callersFunction_cache_key
(name: str, version: str | None, ecosystem: str)
src/skillspector/nodes/analyzers/osv_client.py:77
↓ 3 callersFunction_chat_model_name
(llm: object)
tests/unit/test_llm_utils.py:348
↓ 3 callersFunction_is_documentation_markdown
Return True for markdown files in documentation subdirectories (not SKILL.md).
src/skillspector/nodes/analyzers/static_runner.py:183
↓ 3 callersMethod_is_git_url
Check if path is a Git repository URL.
src/skillspector/input_handler.py:144
↓ 3 callersFunction_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 callersFunction_level_from_string
(level: str)
src/skillspector/logging_config.py:52
↓ 3 callersFunction_llm_degradation_notice
Return a human-readable degraded-scan warning, or None if not degraded.
src/skillspector/nodes/report.py:439
↓ 3 callersFunction_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 callersFunction_make_skill_spec_dir
Populate root with skill spec: SKILL.md, references/, scripts/, assets/.
tests/nodes/test_build_context.py:32
↓ 3 callersFunction_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 callersFunction_model_from_env
(name: str, default: str)
tests/provider/test_provider_endpoint.py:48
↓ 3 callersMethod_next_available_in
Seconds until the earliest rate-limited key recovers, or ``None``.
contrib/multilingual/api_pool.py:368
← previousnext →101–200 of 2,044, ranked by callers