v0.1.2 implementation plan (Track 1 + Track 5)¶
Goal: Close the roadmap “immediate” slice: deeper extraction on MLflow/Jupyter and any remaining file-discovery gaps, with clear acceptance tests.
References: roadmap.md (v0.1.2 section), pkg/exploit/mlflow/secrets.go, cmd/aipostex/mlflow.go, pkg/exploit/jupyter/secrets.go, cmd/aipostex/jupyter.go, pkg/discover/rules/.
1. MLflow: artifact_uri and param connection strings¶
Current state¶
Run.ArtifactURIandRun.Paramsare already parsed in pkg/exploit/mlflow/client.go.- pkg/exploit/mlflow/secrets.go
ExtractSensitiveParamsclassifies cloud artifact URIs (S3, GCS, Azure-style paths) and connection-like param values. - cmd/aipostex/mlflow.go
runMLflowRunsalready emits per-run info findings and additional High findings for each sensitive match, with evidence on the finding.
Remaining work (if any)¶
- Audit vs roadmap: Snowflake-style
artifact_uricovered byTestExtractSensitiveParams_SnowflakeArtifactURIin pkg/exploit/mlflow/secrets_test.go. - Credchain: internal/credchain/credchain.go
extractMLflowRunHintregistersmlflow-run-id; internal/credchain/autochain.go suggestsmlflow artifacts --run-id. Tests:TestExtractMLflowRunID,TestGenerateChainActions_MLflowRunID. - Docs: docs/modules/mlflow.md and roadmap Shipped section updated.
Exit criteria: Roadmap bullet is either marked shipped with test pointers, or a single PR adds the missing scheme/credchain/doc with tests.
2. Jupyter: mine notebook cells for secrets¶
Current state¶
- pkg/exploit/jupyter/secrets.go
MineNotebookSecretsscans notebook JSON cell sources. - cmd/aipostex/jupyter.go
read-notebookfetches content and emits secret findings.jupyter notebooks --mine-secretslists then parallel-fetches each notebook (worker cap 8, usescfg.Concurrency).
Implementation tasks¶
- Option A:
--mine-secretsonjupyter notebookswith bounded parallelism. - Option B: New subcommand
jupyter mine-notebooks(not needed; flag covers the use case). - Reuse
newExploitFinding/ metadata aligned withread-notebooksecret findings (action:notebooks,mine_secrets: true). - Tests: cmd/aipostex/jupyter_notebooks_test.go
TestJupyterNotebooksMineSecretsFindsCredentialInSecondNotebook.
Exit criteria: Operator can obtain cell-level secret findings without manually running read-notebook per path; tests cover at least one multi-notebook list scenario.
3. File discovery: model files + training data¶
Current state¶
- pkg/discover/rules/local_llm.yaml already includes GGUF, SafeTensors, pickle, PyTorch (
.pt/.pth/.bin), ONNX, Ollama paths, Docker AI compose patterns. - pkg/discover/rules/core_assessment.yaml includes fine-tuning manifests (jsonl/parquet + path hints + content patterns), Arrow, TFRecord, embedding/RAG patterns, ML Training CSV Tables, Hugging Face Dataset Manifest.
Remaining work¶
- Gap review: CSV rules constrained to dataset/fine-tune/sft/train path globs plus header heuristics.
- Hugging Face / manifest:
dataset_infos.json/dataset_dict.jsonwith path patterns. - max_file_size semantics: pkg/discover/files.go — default 10MB only when
content_patternsexist; filename-only rules keepMaxFileSize0.matchFileapplies 10MB default only whencompiledContentis non-empty. - Tests: dedicated fixture test for new YAML lines (optional;
go test ./pkg/discover/...passes with embedded rules load).
Exit criteria: Roadmap Track 5 v0.1.2 bullets are either explicitly satisfied by existing rules (document in roadmap “shipped”) or implemented with tests in one PR.
4. Suggested sequencing¶
- Jupyter notebooks mining (largest behavioral gap).
- MLflow audit / small extensions + doc touch-up.
- File rule gaps after a quick inventory against
pkg/discover/rules/*.yaml.
5. Release checklist¶
-
go test -race -tags=integration ./...(run before release) - Update roadmap.md Shipped / v0.1.2 section to reflect what actually landed
- Lab coverage target (roadmap: 95%+) re-run if you track it in coverage.md