Conversation
| if not text: | ||
| return None | ||
| p = Path(text) | ||
| if p.exists(): |
| return None | ||
| p = Path(text) | ||
| if p.exists(): | ||
| return p.resolve() |
| if value in {".", "./"}: | ||
| return False | ||
| p = Path(value) | ||
| if p.exists(): |
| notes: list[str] = [] | ||
|
|
||
| # --- resolve baseline ------------------------------------------------- | ||
| if base_path is not None and base_path.is_dir(): |
|
|
||
|
|
||
| def _load_json(path: Path) -> dict[str, Any] | None: | ||
| if not path.is_file(): |
| if not path.is_file(): | ||
| return None | ||
| try: | ||
| data = json.loads(path.read_text(encoding="utf-8")) |
| Soft-imports existing engines. Never invents missing analysis. | ||
| """ | ||
| opts = dict(options or {}) | ||
| root = Path(target).resolve() |
| name: str = "default", | ||
| ) -> dict[str, Any] | None: | ||
| path = resolve_baseline_dir(project_root) / f"{_safe_name(name)}.json" | ||
| if not path.is_file(): |
| if not path.is_file(): | ||
| return None | ||
| try: | ||
| data = json.loads(path.read_text(encoding="utf-8")) |
| result.setdefault("resolved_findings", []) | ||
| result.setdefault("security_posture_delta", result.get("security_impact") or {}) | ||
| result["github_summary"] = format_github_pr_summary(result) | ||
| return result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
engines/security_diff) that orchestrates Application Model, Data Flow, Attack Graph, Twin, Memory, and Predictive — not a new scanneraxguard diffCLI, MCP toolaxguard_security_diff, API/security-diff, GitHub PR summary consumption, and Pre-Ship integration--fail-on, JSON/HTML output; add fixtures + tests (including hard negatives and authz regression)Test plan
pytest tests/test_security_diff.py tests/test_preship.pyaxguard diff HEAD~1in a git repoaxguard diff --json/--verbose/--fail-on highaxguard diff baseline savethenaxguard diff baselineaxguard mcp tools/ catalog includesaxguard_security_diffgit commit --amend -S --no-editafter unlocking pinentry)