mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
Tasks 1.1, 5.1, 5.2, 5.4 and the data half of 5.3. - mechanisms.toml: closed vocabulary v1 (20 ids) every expected row cites. - vibe-py: 35 Real-Vuln-Benchmark pairs (Apache-2.0), human provenance only because the LLM-generated repositories carry no license (escalated). - vfc-js: 17 Node fix-commit pairs harvested upstream (MIT/Apache-2.0), SecBench.js itself is not vendored (no license); sinks derived on 13/17. - agent-vfc: 29 agent-trailer fixes as catalog-candidates.toml plus REVIEW.md; the loaded catalog stays empty until a human reviews them. - datasets.toml and README document every slice and its review status. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
# Provenance: jfut/dnf-plugin-anyrepo (fixed).
|
|
# repo: jfut/dnf-plugin-anyrepo
|
|
# commit: 26d19aeb8884f244e34ccfdc4f49f07055adc4d0
|
|
# parent: 33cde479d0db8f45dd89fbdcfb2bc0f1be66bd7a
|
|
# commit_url: https://github.com/jfut/dnf-plugin-anyrepo/commit/26d19aeb8884f244e34ccfdc4f49f07055adc4d0
|
|
# cve:
|
|
# license: Apache-2.0
|
|
# function: validate_repo_name
|
|
# relpath: dnf_plugin_anyrepo/config.py
|
|
# provenance: agent
|
|
# mechanism: path_join_user_input
|
|
|
|
def validate_repo_name(name: str) -> str:
|
|
"""Validate the INI section name used as the repository alias."""
|
|
|
|
normalized = str(name).strip()
|
|
if not normalized:
|
|
raise ConfigError("repository name must not be empty")
|
|
if normalized == "main":
|
|
raise ConfigError("repository name must not be main")
|
|
# Keep the alias from resolving to the cache directory itself or its parent.
|
|
if normalized in {".", ".."}:
|
|
raise ConfigError(f"invalid repository name: {name}")
|
|
if any(char in normalized for char in "\x00\r\n[]/\\"):
|
|
raise ConfigError(f"invalid repository name: {name}")
|
|
return normalized
|