跳转到正文
报告库
用途分类 / 开发辅助

Analyze Project Skill 安全审计

作者说它能做什么(原文)

Rigor Analyze / Rigor Audit read-only skill for deep learning research repositories. Use when the user wants to read and understand a repository, inspect model structure and training or inference entrypoints, review configs and insertion points, or flag suspicious implementation patterns without modifying code or running heavy jobs. Do not use for active command execution, broad refactoring, specu

第三方安全检查结论

先别安装或运行

已检查文件
20
发现的风险
6
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。发现 1 项风险
中风险

运行时才决定要执行什么代码

原文依据:2 处
发现了什么

最终命令来自变量,这次静态检查无法确认实际会运行什么。

为什么需要注意

表面看不出来的内容,可能让电脑执行额外命令。现在还不能确定它实际会做什么。

这段代码的正常用途

该行没有调用解释器或执行动态内容;它只是检查被分析 Python 文件的文本是否同时包含 `.eval()` 和 `dropout`,然后添加一条“请审查”的启发式提示。只有静态读取和字符串匹配,不能据此认定会执行仓库代码。

这项判断针对展示的代码和适用条件,不表示风险已经实际发生。
scripts/analyze_project.py:313来自代码打开原文件
            findings.append(f"{rel}: both `relu` and `sigmoid` appear in the same file; check activation order and intent.")        if ".eval()" in lower and "dropout" in lower:            findings.append(f"{rel}: review whether dropout-sensitive evaluation behavior is intentional.")
查看另外 1 个位置
scripts/analyze_project.py:300来自代码打开原文件
    for path in python_files:        text = path.read_text(encoding="utf-8", errors="ignore")        rel = path.relative_to(repo).as_posix()        lower = text.lower()        if "attention" in lower or "transformer" in lower:            saw_attention = True        if any(token in lower for token in ["positional", "position_embedding", "position encoding", "pos_embed"]):            saw_position = True        if "sigmoid" in lower and lower.count("sigmoid") >= 2:            findings.append(f"{rel}: repeated `sigmoid` usage detected; review for duplicated post-processing.")        if "relu" in lower and "sigmoid" in lower:            findings.append(f"{rel}: both `relu` and `sigmoid` appear in the same file; check activation order and intent.")        if ".eval()" in lower and "dropout" in lower:            findings.append(f"{rel}: review whether dropout-sensitive evaluation behavior is intentional.")        if "optimizer" in lower and "requires_grad" not in lower and "param_groups" not in lower:
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。发现 4 项风险
高风险

从 README 自动选出的命令会继承完整进程环境并在本机执行

原文依据:5 处
发现了什么

传入 `--run-selected` 后,编排器会执行从仓库文档提取并自动选择的命令。底层运行器默认复制整个 `os.environ`,随后直接启动进程。恶意或被篡改的 README 因而可让选中程序读取环境中的 API 密钥、云凭据及其他会话秘密,并访问主机或网络。

为什么需要注意

命令可能把凭据、私有源码或本机数据发送到外部服务,也可能以当前用户权限修改文件和账户状态。超时只限制持续时间,不限制其在结束前能访问的资源。

风险成立,但仅在用户显式传入 `--run-selected` 时触发。编排器会从 README 提取并自动选择命令,再交给本机子进程运行;底层默认复制完整 `os.environ`。因此,被篡改文档选中的程序可能读取当前环境变量并使用主机或网络权限。说明文档也明确称这不是 OS 沙箱。用户应先审查最终命令,并要求隔离执行或只传入最小环境。

ai-research-reproduction/scripts/orchestrate_repro.py:1237来自代码打开原文件
    chosen = choose_goal(command_data.get("commands", []), repo_path)    dataset_hint = derive_dataset_hint(asset_data)    checkpoint_hint = derive_checkpoint_hint(asset_data)    run_data: Dict[str, Any] = {
查看另外 4 个位置
ai-research-reproduction/scripts/orchestrate_repro.py:1292来自代码打开原文件
            )        else:            run_data = maybe_run_command(                repo_path,                chosen["documented_command"],                args.timeout,                args.user_language,                args.shell_mode,                runtime_root,                model_adapter,                args.monitor_gpu,            )
ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py:487来自代码打开原文件
    try:        argv = build_command(command, shell_mode)        environment = dict(os.environ if child_env is None else child_env)        spec["requested_argv"] = list(argv)        atomic_write_json(run_dir / "spec.json", spec)        if shell_mode == "direct":            argv = resolve_direct_argv(argv, repo, environment)        spec["argv"] = list(argv)        atomic_write_json(run_dir / "spec.json", spec)        creationflags = subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0        process = subprocess.Popen(            argv,            env=environment,            cwd=repo,            stdout=subprocess.PIPE,            stderr=subprocess.PIPE,            text=True,            encoding="utf-8",            errors="replace",            bufsize=1,            creationflags=creationflags,            start_new_session=os.name != "nt",        )    except (FileNotFoundError, ShellSyntaxRequired, OSError, ValueError) as exc:
ai-research-reproduction/scripts/orchestrate_repro.py:1167来自代码打开原文件
    scan_data = run_json(scan_script, ["--repo", str(repo_path), "--json"])    readme_path = scan_data.get("readme_path")    command_data: Dict[str, Any] = {"commands": [], "counts": {}, "warnings": []}    if readme_path:        command_data = run_json(extract_script, ["--readme", readme_path, "--json"])        command_data = delegate_to_docs(readme_path, extract_script, command_data)
ai-research-reproduction/scripts/orchestrate_repro.py:1272来自代码打开原文件
        )    elif args.run_selected:        if chosen["selected_goal"] == "training":            run_data = maybe_run_training(                repo_path=repo_path,                command=chosen["documented_command"],                train_script=train_execute_script,                lane=args.lane,                user_language=args.user_language,                full_training_authorized=args.full_training_authorized,                train_timeout=args.train_timeout,                dataset_hint=dataset_hint,                checkpoint_hint=checkpoint_hint,                resume_from=args.resume_from,                max_train_steps=args.max_train_steps,                shell_mode=args.shell_mode,                runtime_root=runtime_root,                model_profile_json=args.model_profile_json,                required_model_capabilities=args.require_model_capability,                gpu_monitor_enabled=not args.no_gpu_monitor,            )        else:            run_data = maybe_run_command(                repo_path,                chosen["documented_command"],                args.timeout,                args.user_language,                args.shell_mode,                runtime_root,                model_adapter,                args.monitor_gpu,            )
中风险

模型入口可把私有仓库文件内容发送到 Anthropic 或自定义端点

原文依据:4 处
发现了什么

模型工具能够读取初始仓库清单中的文件,并把读取结果加入持续的消息记录;下一次 `provider.complete` 会发送这些消息。配置还允许使用 `ANTHROPIC_BASE_URL` 或指定的 HTTPS endpoint。因此,代码和配置内容会离开本机,而不只是命令执行结果。

为什么需要注意

私有源码、内部路径、数据样例或文件中未被排除的秘密可能被模型服务或自定义网关接收,并可能出现在持久化轨迹中。

模型入口允许模型读取初始清单内最多 12,000 个字符的文件片段,并把工具结果加入后续消息;随后这些消息被传给 `provider.complete`。该入口限定 Anthropic 协议,同时文档允许官方地址、`ANTHROPIC_BASE_URL` 或配置的 HTTPS endpoint。因此,启用该可选入口时,读取的私有代码或配置可能发送给所选服务。用户应审查端点与隐私条款,并限制允许读取的仓库内容。

ai-research-reproduction/scripts/run_agent.py:438来自代码打开原文件
                    try:                        if name == "list_files":                            value = {"files": sorted(files)}                        elif name == "read_file":                            if args["path"] not in files:                                raise ValueError("File was not in the permitted initial inventory")                            offset = max(0, int(args.get("offset", 0)))                            with safe_file(repo, args["path"]).open("r", encoding="utf-8") as handle:                                handle.seek(offset)                                value = {"path": args["path"], "text": handle.read(12000), "next_offset": handle.tell()}                        elif name == "update_plan":
查看另外 3 个位置
ai-research-reproduction/scripts/run_agent.py:495来自代码打开原文件
                        value = {"error": str(exc)}                    event("tool_result", tool=name, result=value)                    state["tool_results"].append({"type": "tool_result", "tool_use_id": call["id"],                        "content": json.dumps(value, ensure_ascii=False), "is_error": "error" in value})                    state["pending"].pop(0)                    tools_this_turn += 1                    save()                    if pause_after_tools and tools_this_turn >= pause_after_tools and state["status"] == "running":                        state["status"] = "paused"                        event("paused", reason="Explicit test/session checkpoint")                    continue                if state["tool_results"]:                    state["messages"].append({"role": "user", "content": state.pop("tool_results")})                    state["tool_results"] = []                request_bytes = len(json.dumps([SYSTEM, TOOLS, state["messages"]]).encode())                used = sum(state["usage"].values())                reserve = request_bytes + budget["max_output_tokens"] + 1024                if state["model_calls"] >= budget["max_model_calls"] or used + reserve > budget["max_total_tokens"]:                    block("Model call/token reservation budget reached")                    break                state["model_calls"] += 1                state["model_pending"] = True                state["usage_complete"] = False                save()                event("model_request", call=state["model_calls"], reserved_tokens=reserve)                response = provider.complete(state["messages"], SYSTEM, TOOLS, budget["max_output_tokens"], min(60, remaining))                if not isinstance(response, dict):
ai-research-reproduction/references/agent-runner.md:110来自说明文档打开原文件
`endpoint` optionally names the final HTTPS endpoint. Without it, the clientuses `ANTHROPIC_BASE_URL` or the official endpoint. For an already configuredBearer gateway, set `metadata.auth_scheme` to `bearer` and name its credentialenvironment variable. Redirects are refused so credentials are not forwarded.
ai-research-reproduction/scripts/run_agent.py:570来自代码打开原文件
    args = parser.parse_args()    profile = load_model_profile(Path(args.model_profile))    if profile["provider"] != "anthropic":        parser.error("P1 supports the Anthropic Messages protocol; other adapters remain metadata-only")    task = json.loads(Path(args.task).read_text(encoding="utf-8-sig"))    state = run(task, Path(args.repo), Path(args.output), profile, AnthropicProvider(profile),                resume=args.resume, pause_after_tools=args.pause_after_tools, source_adjacent_readme=args.source_adjacent_readme)    print(json.dumps({**{k: state[k] for k in ["status", "model_calls", "tool_calls", "usage", "verification"]},
中风险

分析器可能跟随仓库内的文件符号链接读取仓库外内容

原文依据:4 处
发现了什么

分析代码对 `repo.rglob("*.py")` 返回的路径直接调用 `read_text`,没有像模型入口那样先解析并确认目标仍位于仓库内。指向仓库外 Python 文件的符号链接因此会被读取;解析出的类名、函数名或启发式结论还会进入报告。

为什么需要注意

仓库可诱使分析器访问用户未授权纳入审计的本机文件,并将其中的结构信息写入分析输出。如果这些输出随后上传或分享,会造成间接信息泄露。

分析器递归收集 `*.py` 路径后直接 `read_text`,没有解析路径并确认目标仍在仓库内;文件符号链接会在读取时被跟随。因此,仓库内指向外部 Python 文件的符号链接可能暴露其文本。读取到的内容可产生带路径的启发式结论并写入 `RISKS.md`。风险取决于仓库是否含此类符号链接及运行账户能否读取目标。用户可要求在隔离副本中分析并拒绝越界符号链接。

scripts/analyze_project.py:294来自代码打开原文件
def collect_suspicious_patterns(repo: Path) -> List[str]:    findings: List[str] = []    python_files = [path for path in repo.rglob("*.py") if "__pycache__" not in path.parts]    saw_attention = False    saw_position = False    for path in python_files:        text = path.read_text(encoding="utf-8", errors="ignore")        rel = path.relative_to(repo).as_posix()        lower = text.lower()
查看另外 3 个位置
scripts/analyze_project.py:247来自代码打开原文件
    for rel in candidate_paths[:24]:        path = repo / rel        if not path.exists() or path.suffix.lower() != ".py":            continue        try:            tree = ast.parse(path.read_text(encoding="utf-8", errors="ignore"))        except SyntaxError:            continue        for node in ast.walk(tree):            if isinstance(node, ast.ClassDef):                symbol_hints.append(f"{rel}:{node.name}")                has_init = any(isinstance(item, ast.FunctionDef) and item.name == "__init__" for item in node.body)                has_forward = any(isinstance(item, ast.FunctionDef) and item.name == "forward" for item in node.body)                if has_init:                    constructor_candidates.append(f"{rel}:{node.name}")                if has_forward:                    forward_candidates.append(f"{rel}:{node.name}.forward")            elif isinstance(node, ast.FunctionDef):                symbol_hints.append(f"{rel}:{node.name}")                if node.name in {"forward", "__call__", "predict"}:
scripts/analyze_project.py:309来自代码打开原文件
            saw_position = True        if "sigmoid" in lower and lower.count("sigmoid") >= 2:            findings.append(f"{rel}: repeated `sigmoid` usage detected; review for duplicated post-processing.")        if "relu" in lower and "sigmoid" in lower:            findings.append(f"{rel}: both `relu` and `sigmoid` appear in the same file; check activation order and intent.")        if ".eval()" in lower and "dropout" in lower:            findings.append(f"{rel}: review whether dropout-sensitive evaluation behavior is intentional.")        if "optimizer" in lower and "requires_grad" not in lower and "param_groups" not in lower:            findings.append(f"{rel}: verify optimizer parameter coverage if custom freezing is expected.")
scripts/analyze_project.py:588来自代码打开原文件
    risks = [        "# Suspicious Patterns",        "",    ]    patterns = data["suspicious_patterns"]    if patterns:        risks.extend(f"- {item}" for item in patterns)    else:        risks.append("- No high-signal suspicious patterns were detected by the lightweight heuristic pass.")    risks.append("")    (output_dir / "RISKS.md").write_text("\n".join(risks), encoding="utf-8")
中风险

默认 lesson 记录会在工作区外长期保存失败摘要和文档命令

原文依据:7 处
发现了什么

只要没有设置 `RIGORPILOT_LESSONS=0`,复现运行会把阻塞摘要、文档命令及仓库指纹追加到 `~/.rigorpilot/lessons.jsonl`。过滤器仅匹配有限的凭据关键词和常见令牌格式;普通私有 URL、用户名、内部路径或未识别的秘密仍可能被保存。

为什么需要注意

敏感的项目线索会跨仓库、跨会话留在用户主目录,可能被备份、共享机器上的其他流程或后续报告读取。用户清理工作区并不会删除它。

记录功能默认开启;运行被选择后,阻塞/部分结果会把摘要、文档命令和仓库指纹追加到工作区外的 `~/.rigorpilot/lessons.jsonl`(或 `RIGORPILOT_HOME`)。过滤器只是有限正则,策略本身也承认并非保证,所以内部路径、私有 URL、个人信息或未知格式秘密可能留下,直到用户另行清理或运行 prune。用户可在运行前设置 `RIGORPILOT_LESSONS=0`,并审查该存储。

ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:20来自代码打开原文件
VALID_KINDS = {"failure-fix", "user-correction", "preference", "generalization"}# Best-effort blocklist: keyword shapes plus common bare-credential formats.# This is a guardrail, not a guarantee — callers still must not pass secrets.SECRET_RE = re.compile(    r"(api[_-]?key|secret|token|password|passwd|authorization|bearer\s+\S|-----BEGIN"    r"|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{20,}|gho_[A-Za-z0-9]{20,}|sk-[A-Za-z0-9_-]{16,}"    r"|xox[a-z]-[A-Za-z0-9-]{10,}|AIza[0-9A-Za-z_-]{30,})",    re.IGNORECASE,)MAX_FIELD_CHARS = 300SUMMARY_LIMIT_PER_KIND = 12
查看另外 6 个位置
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:117来自代码打开原文件
    entry = {        "ts": int(time.time()),        "kind": kind,        "skill": sanitize(skill) or "unknown",        "summary": clean_summary,        "detail": clean_detail,        "fingerprint": sanitize(fingerprint) or "",    }    path = lessons_path()    path.parent.mkdir(parents=True, exist_ok=True)    with path.open("a", encoding="utf-8") as handle:        handle.write(json.dumps(entry, ensure_ascii=False) + "\n")    return path
ai-research-reproduction/scripts/orchestrate_repro.py:1391来自代码打开原文件
    context["lesson_recorded"] = maybe_record_lesson(repo_path, context) if args.run_selected else None
ai-research-reproduction/SKILL.md:123来自说明文档打开原文件
- Load `references/deep-learning-experiment-principles.md` when dataset, split, metric, checkpoint, training, or evaluation details matter.- Consult `~/.rigorpilot/PERSONAL_RIGOR.md` if present, under `references/continuous-learning-policy.md` (advisory only; core wins).- Failed and later-resolved runs are auto-recorded as lessons via `shared/scripts/lessons_store.py` (`RIGORPILOT_LESSONS=0` disables).- Load `references/research-safety-principles.md` before protocol-sensitive
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:41来自代码打开原文件
def lessons_home() -> Path:    root = os.environ.get("RIGORPILOT_HOME")    return Path(root).expanduser() if root else Path.home() / ".rigorpilot"def lessons_enabled() -> bool:    return os.environ.get("RIGORPILOT_LESSONS", "1") != "0"
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:67来自代码打开原文件
def sanitize(text: str) -> Optional[str]:    cleaned = " ".join(str(text or "").split())[:MAX_FIELD_CHARS]    if not cleaned:        return None    if SECRET_RE.search(cleaned):        return None    return cleaned
ai-research-reproduction/scripts/orchestrate_repro.py:62来自代码打开原文件
    try:        if status in {"partial", "blocked"}:            path = store.record_lesson(                kind="failure-fix",                skill="ai-research-reproduction",                summary=f"[{status}] {context.get('main_blocker', 'unrecorded blocker')}",                detail=str(context.get("documented_command") or ""),                fingerprint=fingerprint,            )            return str(path) if path else None
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。发现 1 项风险
中风险

“只读”分析会无提示覆盖输出目录中的固定文件名

原文依据:5 处
发现了什么

非 `--json` 模式会对 `SUMMARY.md`、`RISKS.md`、多个映射文件和 `status.json` 使用 `write_text`。用户可指定任意 `--output-dir`,代码没有检查这些文件是否已存在,也没有所有权凭据或备份。

为什么需要注意

如果输出目录已含同名笔记、报告或状态文件,它们会被不可逆地替换。名称“read-only”可能使用户低估这种写入行为。

这里的“只读”仅保护被分析仓库代码,并不表示完全不写文件:技能明确要求分析输出。非 `--json` 模式接受任意 `--output-dir`,创建该目录后用 `write_text` 写固定名称,未检查同名文件是否已存在。因此,如果用户把输出目录指向含有重要 `SUMMARY.md`、`RISKS.md` 或 `status.json` 的位置,这些文件会被覆盖。用户应使用新的专用输出目录并先检查同名文件。

scripts/analyze_project.py:567来自代码打开原文件
def write_outputs(output_dir: Path, data: Dict[str, object]) -> None:    output_dir.mkdir(parents=True, exist_ok=True)    summary = [        "# Project Analysis Summary",        "",        *[f"- {line}" for line in data["summary_lines"]],        "",        "## Conservative Suggestions",        "",        *[f"- {line}" for line in data["conservative_suggestions"]],        "",        "## Additional Documents",        "",        "- `RESEARCH_MAP.md`",        "- `CHANGE_MAP.md`",        "- `EVAL_CONTRACT.md`",        "",    ]    (output_dir / "SUMMARY.md").write_text("\n".join(summary), encoding="utf-8")
查看另外 4 个位置
scripts/analyze_project.py:588来自代码打开原文件
    risks = [        "# Suspicious Patterns",        "",    ]    patterns = data["suspicious_patterns"]    if patterns:        risks.extend(f"- {item}" for item in patterns)    else:        risks.append("- No high-signal suspicious patterns were detected by the lightweight heuristic pass.")    risks.append("")    (output_dir / "RISKS.md").write_text("\n".join(risks), encoding="utf-8")
scripts/analyze_project.py:631来自代码打开原文件
    }    (output_dir / "status.json").write_text(json.dumps(status, indent=2, ensure_ascii=False), encoding="utf-8")def main() -> int:    parser = argparse.ArgumentParser(description="Analyze a deep learning research repository conservatively.")    parser.add_argument("--repo", required=True, help="Path to the target repository.")    parser.add_argument("--output-dir", default="analysis_outputs", help="Directory for analysis outputs.")    parser.add_argument("--analysis-context-json", default="", help="Optional analysis context JSON or YAML path.")    parser.add_argument("--json", action="store_true", help="Emit JSON to stdout instead of writing files.")    args = parser.parse_args()    repo = Path(args.repo).resolve()    context = load_context(args.analysis_context_json)    data = analyze_repo(repo, context)    if args.json:        print(json.dumps(data, indent=2, ensure_ascii=False))        return 0    write_outputs(Path(args.output_dir).resolve(), data)    print(json.dumps(data, indent=2, ensure_ascii=False))    return 0
SKILL.md:29来自说明文档打开原文件
## Clear boundaries- This skill is read-mostly.- It may run lightweight static inspection helpers.- It does not patch repository code.- It does not own final reproduction outputs.- It should mark suspicious patterns as heuristics, not confirmed bugs.## Output expectations- `analysis_outputs/SUMMARY.md`- `analysis_outputs/RISKS.md`- `analysis_outputs/status.json`
scripts/analyze_project.py:586来自代码打开原文件
    ]    (output_dir / "SUMMARY.md").write_text("\n".join(summary), encoding="utf-8")    risks = [        "# Suspicious Patterns",        "",    ]    patterns = data["suspicious_patterns"]    if patterns:        risks.extend(f"- {item}" for item in patterns)    else:        risks.append("- No high-signal suspicious patterns were detected by the lightweight heuristic pass.")    risks.append("")    (output_dir / "RISKS.md").write_text("\n".join(risks), encoding="utf-8")
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

5 个说明模块

顶层 `analyze-project` 的主要实现会递归检查仓库文件、解析 Python AST,并用启发式规则生成入口点、结构和可疑模式报告;它不会修改仓库源码,但默认会写分析产物。

查看原文
SKILL.md:31来自说明文档打开原文件
- This skill is read-mostly.- It may run lightweight static inspection helpers.- It does not patch repository code.- It does not own final reproduction outputs.- It should mark suspicious patterns as heuristics, not confirmed bugs.
scripts/analyze_project.py:425来自代码打开原文件
    candidates = collect_candidates(repo, task_family, tokens)    focus_files = collect_task_focus_files(repo, task_family, tokens)    data_interface_files = collect_data_interface_files(repo, task_family)    suspicious = collect_suspicious_patterns(repo)    output_hints = collect_output_hints(repo, evaluation_source)    module_files = collect_module_files(candidates, focus_files)    metric_files = collect_metric_files(candidates, focus_files)    symbol_info = collect_symbol_hints(repo, unique_limit(module_files + metric_files + candidates["train"] + candidates["eval"], 30))    config_binding_hints = collect_config_binding_hints(repo, unique_limit(candidates["config"] + focus_files + output_hints, 30))    research_map = build_research_map(repo, readme or repo / "README.md", task_family, candidates, focus_files, output_hints)

所提供的包还包含一个范围更大的复现技能。它可以从 README 及其本地链接文档提取命令,并且只有在传入 `--run-selected` 时才尝试执行选中的命令。

查看原文
ai-research-reproduction/scripts/orchestrate_repro.py:1167来自代码打开原文件
    scan_data = run_json(scan_script, ["--repo", str(repo_path), "--json"])    readme_path = scan_data.get("readme_path")    command_data: Dict[str, Any] = {"commands": [], "counts": {}, "warnings": []}    if readme_path:        command_data = run_json(extract_script, ["--readme", readme_path, "--json"])        command_data = delegate_to_docs(readme_path, extract_script, command_data)
ai-research-reproduction/scripts/orchestrate_repro.py:1106来自代码打开原文件
    parser.add_argument("--no-gpu-monitor", action="store_true", help="Disable NVIDIA telemetry for training commands.")    parser.add_argument("--user-language", default="en", help="Language tag for human-readable reports.")    parser.add_argument("--run-selected", action="store_true", help="Execute the selected documented command.")    parser.add_argument("--include-analysis-pass", action="store_true", help="Run analyze-project and record its outputs in the stage ledger.")    parser.add_argument(

可选的模型驱动入口使用 Anthropic Messages 协议。模型只能选择任务 JSON 中预先审核的命令 ID,但该执行仍是本机进程,不是操作系统沙箱。

查看原文
ai-research-reproduction/scripts/run_agent.py:47来自代码打开原文件
TOOLS = [    tool("list_files", "List the initial repository file inventory", {}, []),    tool("read_file", "Read a UTF-8 repository file, optionally from an offset", {        "path": {"type": "string"}, "offset": {"type": "integer", "minimum": 0}}, ["path"]),    tool("update_plan", "Record completed and remaining work", {        "steps": {"type": "array", "items": {"type": "string"}}}, ["steps"]),    tool("run_command", "Execute a reviewed command ID; cannot change its argv", {        "command_id": {"type": "string"}}, ["command_id"]),    tool("finish", "Request independent final verification", {"summary": {"type": "string"}}, ["summary"]),]
ai-research-reproduction/references/agent-runner.md:16来自说明文档打开原文件
This is local execution with credential environment filtering, not an OS sandbox.Approved programs can access the host and network; use only trusted repositoriesuntil an isolated executor is configured. Commands that change scientificconditions must be explicitly reviewed. P1 targets small evaluations, not fulltraining or autonomous source repair.

复现流程默认启用跨运行的个人 lesson 存储;执行结果为阻塞、部分成功或解决了先前故障时,可能把摘要、命令细节和仓库指纹追加到用户主目录下。

查看原文
ai-research-reproduction/_bundled/shared/scripts/lessons_store.py:41来自代码打开原文件
def lessons_home() -> Path:    root = os.environ.get("RIGORPILOT_HOME")    return Path(root).expanduser() if root else Path.home() / ".rigorpilot"def lessons_enabled() -> bool:    return os.environ.get("RIGORPILOT_LESSONS", "1") != "0"
ai-research-reproduction/scripts/orchestrate_repro.py:62来自代码打开原文件
    try:        if status in {"partial", "blocked"}:            path = store.record_lesson(                kind="failure-fix",                skill="ai-research-reproduction",                summary=f"[{status}] {context.get('main_blocker', 'unrecorded blocker')}",                detail=str(context.get("documented_command") or ""),                fingerprint=fingerprint,            )            return str(path) if path else None
从这里开始 · 工作说明SKILL.md
analyze-project
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

20 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录20 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • ai-research-reproduction/_bundled/shared/scripts/lessons_store.py已纳入全文
  • ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py已纳入全文
  • ai-research-reproduction/_bundled/shared/scripts/task_queue.py已纳入全文
  • ai-research-reproduction/scripts/orchestrate_repro.py已纳入全文
  • ai-research-reproduction/scripts/run_agent.py已纳入全文
  • scripts/analyze_project.py已纳入全文
  • references/analysis-policy.md已纳入全文
  • ai-research-reproduction/references/agent-operating-principles.md已纳入全文
  • ai-research-reproduction/references/agent-runner.md已纳入全文
  • ai-research-reproduction/references/continuous-learning-policy.md已纳入全文
  • ai-research-reproduction/references/deep-learning-experiment-principles.md已纳入全文
  • ai-research-reproduction/references/language-policy.md已纳入全文
  • ai-research-reproduction/references/output-spec.md已纳入全文
  • ai-research-reproduction/references/patch-policy.md已纳入全文
  • ai-research-reproduction/references/research-rigor-principles.md已纳入全文
  • ai-research-reproduction/references/research-safety-principles.md已纳入全文
  • ai-research-reproduction/references/runtime-and-model-adapter.md已纳入全文
  • ai-research-reproduction/SKILL.md已纳入全文
  • agents/openai.yaml已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明
  • agents/openai.yaml配套文件
  • references/analysis-policy.md配套文件
  • scripts/analyze_project.py脚本
  • ai-research-reproduction/SKILL.md配套文件
  • ai-research-reproduction/references/agent-operating-principles.md配套文件
  • ai-research-reproduction/references/research-rigor-principles.md配套文件
  • ai-research-reproduction/references/deep-learning-experiment-principles.md配套文件
  • ai-research-reproduction/scripts/orchestrate_repro.py脚本
  • ai-research-reproduction/references/runtime-and-model-adapter.md配套文件
  • ai-research-reproduction/references/agent-runner.md配套文件
  • ai-research-reproduction/scripts/run_agent.py脚本
  • ai-research-reproduction/references/patch-policy.md配套文件
  • ai-research-reproduction/references/output-spec.md配套文件
  • ai-research-reproduction/references/language-policy.md配套文件
  • ai-research-reproduction/references/continuous-learning-policy.md配套文件
  • ai-research-reproduction/_bundled/shared/scripts/lessons_store.py脚本
  • ai-research-reproduction/references/research-safety-principles.md配套文件
  • ai-research-reproduction/_bundled/shared/scripts/runtime_runner.py脚本
  • ai-research-reproduction/_bundled/shared/scripts/task_queue.py脚本

代码和说明中提到的操作

读取文件
scripts/analyze_project.py:50来自代码打开原文件
    context_path = Path(path).resolve()    text = context_path.read_text(encoding="utf-8-sig")    if context_path.suffix.lower() == ".json":
scripts/analyze_project.py:252来自代码打开原文件
        try:            tree = ast.parse(path.read_text(encoding="utf-8", errors="ignore"))        except SyntaxError:
scripts/analyze_project.py:288来自代码打开原文件
            continue        text = path.read_text(encoding="utf-8", errors="ignore").lower()        if any(pattern in text for pattern in patterns):
修改文件
scripts/analyze_project.py:505来自代码打开原文件
    ]    (output_dir / "RESEARCH_MAP.md").write_text("\n".join(lines), encoding="utf-8")
scripts/analyze_project.py:534来自代码打开原文件
    ]    (output_dir / "CHANGE_MAP.md").write_text("\n".join(lines), encoding="utf-8")
scripts/analyze_project.py:564来自代码打开原文件
    ]    (output_dir / "EVAL_CONTRACT.md").write_text("\n".join(lines), encoding="utf-8")
运行命令
ai-research-reproduction/scripts/orchestrate_repro.py:12来自代码打开原文件
import shleximport subprocessimport sys
ai-research-reproduction/scripts/orchestrate_repro.py:103来自代码打开原文件
    child_env["PYTHONIOENCODING"] = "utf-8"    result = subprocess.run(        command,
ai-research-reproduction/scripts/orchestrate_repro.py:121来自代码打开原文件
    try:        subprocess.run(            [
读取密钥或账号配置
ai-research-reproduction/scripts/orchestrate_repro.py:101来自代码打开原文件
    command = [sys.executable, str(script), *args]    child_env = os.environ.copy()    child_env["PYTHONIOENCODING"] = "utf-8"
ai-research-reproduction/scripts/run_agent.py:65来自代码打开原文件
    path = (repo / name).resolve()    if (not path.is_relative_to(repo) or any(p == ".git" or p.startswith(".env") for p in Path(name).parts)            or any(p == ".git" or p.startswith(".env") for p in path.relative_to(repo).parts)):
ai-research-reproduction/scripts/run_agent.py:66来自代码打开原文件
    if (not path.is_relative_to(repo) or any(p == ".git" or p.startswith(".env") for p in Path(name).parts)            or any(p == ".git" or p.startswith(".env") for p in path.relative_to(repo).parts)):        raise ValueError("File path is outside the permitted repository scope")
安装其他软件包
ai-research-reproduction/scripts/orchestrate_repro.py:252来自代码打开原文件
        score -= 10    if text_value.startswith(("pip install", "conda install", "conda env create", "conda activate", "git clone", "cd ")):        score -= 12
连接外部网站
ai-research-reproduction/scripts/orchestrate_repro.py:357来自代码打开原文件
        rel = match.group(1)        if rel.startswith(("http://", "https://")):            continue
ai-research-reproduction/scripts/run_agent.py:343来自代码打开原文件
        raise ValueError("All budget limits must be positive integers")    endpoint_identity = fingerprint(profile.get("endpoint") or os.getenv("ANTHROPIC_BASE_URL") or "https://api.anthropic.com")    harness_identity = fingerprint([Path(__file__).read_bytes().replace(b"\r\n", b"\n").hex(), SYSTEM, TOOLS,
ai-research-reproduction/references/runtime-and-model-adapter.md:65来自说明文档打开原文件
  "capabilities": ["text", "tool_calling", "structured_output"],  "endpoint": "https://gateway.example/v1",  "credential_env": "LAB_MODEL_API_KEY",
读取了多少行
5,436
文件校验值(用于核对版本)
1754df5ebbb44a172a0d8fe10b695bfdaa5a37d3a2cca2f3cc5d4f72ea4918df