shakerscan 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- shakerscan-0.1.0/.gitignore +88 -0
- shakerscan-0.1.0/PKG-INFO +40 -0
- shakerscan-0.1.0/README.md +21 -0
- shakerscan-0.1.0/hatch_build.py +59 -0
- shakerscan-0.1.0/pyproject.toml +42 -0
- shakerscan-0.1.0/src/shakerscan/__init__.py +3 -0
- shakerscan-0.1.0/src/shakerscan/__main__.py +3 -0
- shakerscan-0.1.0/src/shakerscan/_mcp.py +983 -0
- shakerscan-0.1.0/src/shakerscan/_v2_cli.py +1062 -0
- shakerscan-0.1.0/src/shakerscan/_vendored.py +51 -0
- shakerscan-0.1.0/src/shakerscan/cli.py +307 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Generated benchmark/test scratch output
|
|
2
|
+
tests/benchmark/results/
|
|
3
|
+
|
|
4
|
+
# Results (scan outputs, checkpoints, benchmark and planner-eval cards) are local-only. Release
|
|
5
|
+
# benchmark cards are uploaded as certification artifacts and their digests are sealed into the
|
|
6
|
+
# certified receipt attached to each GitHub Release; nothing under results/ belongs in git.
|
|
7
|
+
results/
|
|
8
|
+
|
|
9
|
+
# Environment
|
|
10
|
+
.venv/
|
|
11
|
+
venv/
|
|
12
|
+
.env
|
|
13
|
+
.env.local
|
|
14
|
+
.env.*
|
|
15
|
+
backups/
|
|
16
|
+
.shakerscan-fleet/
|
|
17
|
+
.shakerscan-model-intake-runner-stage/
|
|
18
|
+
.shakerscan-local-build
|
|
19
|
+
.shakerscan-local-build.tmp.*
|
|
20
|
+
.shakerscan-build-receipt.json
|
|
21
|
+
.shakerscan-build-receipt.json.tmp.*
|
|
22
|
+
|
|
23
|
+
# Claude Code local settings
|
|
24
|
+
.claude/settings.local.json
|
|
25
|
+
.claude/projects/
|
|
26
|
+
|
|
27
|
+
# Node
|
|
28
|
+
node_modules/
|
|
29
|
+
.next/
|
|
30
|
+
*.tsbuildinfo
|
|
31
|
+
ui/next-env.d.ts
|
|
32
|
+
ui/test-results/
|
|
33
|
+
ui/playwright-report/
|
|
34
|
+
*.log
|
|
35
|
+
bun.lockb
|
|
36
|
+
|
|
37
|
+
# Python
|
|
38
|
+
__pycache__/
|
|
39
|
+
*.pyc
|
|
40
|
+
*.pyo
|
|
41
|
+
.pytest_cache/
|
|
42
|
+
*.egg-info/
|
|
43
|
+
dist/
|
|
44
|
+
build/
|
|
45
|
+
.coverage
|
|
46
|
+
htmlcov/
|
|
47
|
+
coverage/
|
|
48
|
+
|
|
49
|
+
# Docker
|
|
50
|
+
*.tar
|
|
51
|
+
|
|
52
|
+
# IDE
|
|
53
|
+
.vscode/
|
|
54
|
+
.idea/
|
|
55
|
+
*.swp
|
|
56
|
+
*.swo
|
|
57
|
+
|
|
58
|
+
# OS
|
|
59
|
+
.DS_Store
|
|
60
|
+
Thumbs.db
|
|
61
|
+
|
|
62
|
+
# Operator audit evidence (historical engineering ledgers are in Git history)
|
|
63
|
+
audit-results/
|
|
64
|
+
|
|
65
|
+
# Test-runner XML output from scripts/run_complete_python_suite.py
|
|
66
|
+
artifacts/v2-*.xml
|
|
67
|
+
|
|
68
|
+
# Operator data never belongs in the public source tree.
|
|
69
|
+
/exports/
|
|
70
|
+
/captures/
|
|
71
|
+
/quarantine/
|
|
72
|
+
/operator-data/
|
|
73
|
+
*.har
|
|
74
|
+
*.pcap
|
|
75
|
+
*.pcapng
|
|
76
|
+
*.sqlite
|
|
77
|
+
*.sqlite3
|
|
78
|
+
*.dump
|
|
79
|
+
# Deliberately reviewed synthetic fixtures may be checked in.
|
|
80
|
+
!tests/fixtures/**/*.har
|
|
81
|
+
!tests/fixtures/**/*.pcap
|
|
82
|
+
!tests/fixtures/**/*.pcapng
|
|
83
|
+
|
|
84
|
+
# The shakerscan client (client/): build outputs, and the runtime modules vendored at build time.
|
|
85
|
+
client/dist/
|
|
86
|
+
client/build/
|
|
87
|
+
client/src/shakerscan/_mcp.py
|
|
88
|
+
client/src/shakerscan/_v2_cli.py
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: shakerscan
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ShakerScan client: the MCP adapter and Hunt CLI for a ShakerScan instance, without the engine
|
|
5
|
+
Project-URL: Homepage, https://shakerscan.com
|
|
6
|
+
Project-URL: Source, https://github.com/andriyze/shakerscan
|
|
7
|
+
Project-URL: Documentation, https://github.com/andriyze/shakerscan/blob/main/docs/client.md
|
|
8
|
+
Author: ShakerScan
|
|
9
|
+
License-Expression: AGPL-3.0-only
|
|
10
|
+
Keywords: dast,hunt,mcp,pentest,security,shakerscan
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Information Technology
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Security
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# shakerscan
|
|
21
|
+
|
|
22
|
+
The ShakerScan client: the MCP adapter and the Hunt CLI for a ShakerScan instance, without the
|
|
23
|
+
engine. Point it at a local engine, a VPS, or a self-hosted Enterprise gateway with a service
|
|
24
|
+
token, and hand it to an agent (Claude Code, Codex, any MCP client) or to a script.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pipx install shakerscan # or: uv tool install shakerscan
|
|
28
|
+
shakerscan doctor --url https://scanner.example.com --token-file ./token
|
|
29
|
+
shakerscan mcp --url https://scanner.example.com --token-file ./token
|
|
30
|
+
shakerscan hunt --url https://scanner.example.com --token-file ./token list
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
It installs the same `shakerscan` command name as the engine installer
|
|
34
|
+
(`curl -fsSL https://install.shakerscan.com | sh`): `mcp`, `hunt`, `doctor` and `version` work
|
|
35
|
+
without Docker, and any engine subcommand (`start`, `stop`, `status`, `update`, ...) is handed to
|
|
36
|
+
a local engine install when one exists. The adapter and CLI are the runtime's own code, vendored
|
|
37
|
+
at build time, and the tools an agent sees come from the instance's live contracts.
|
|
38
|
+
|
|
39
|
+
Python 3.10 or newer, no third-party dependencies, AGPL-3.0-only. Documentation:
|
|
40
|
+
https://github.com/andriyze/shakerscan/blob/main/docs/client.md
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# shakerscan
|
|
2
|
+
|
|
3
|
+
The ShakerScan client: the MCP adapter and the Hunt CLI for a ShakerScan instance, without the
|
|
4
|
+
engine. Point it at a local engine, a VPS, or a self-hosted Enterprise gateway with a service
|
|
5
|
+
token, and hand it to an agent (Claude Code, Codex, any MCP client) or to a script.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pipx install shakerscan # or: uv tool install shakerscan
|
|
9
|
+
shakerscan doctor --url https://scanner.example.com --token-file ./token
|
|
10
|
+
shakerscan mcp --url https://scanner.example.com --token-file ./token
|
|
11
|
+
shakerscan hunt --url https://scanner.example.com --token-file ./token list
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
It installs the same `shakerscan` command name as the engine installer
|
|
15
|
+
(`curl -fsSL https://install.shakerscan.com | sh`): `mcp`, `hunt`, `doctor` and `version` work
|
|
16
|
+
without Docker, and any engine subcommand (`start`, `stop`, `status`, `update`, ...) is handed to
|
|
17
|
+
a local engine install when one exists. The adapter and CLI are the runtime's own code, vendored
|
|
18
|
+
at build time, and the tools an agent sees come from the instance's live contracts.
|
|
19
|
+
|
|
20
|
+
Python 3.10 or newer, no third-party dependencies, AGPL-3.0-only. Documentation:
|
|
21
|
+
https://github.com/andriyze/shakerscan/blob/main/docs/client.md
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Vendor the runtime's MCP adapter and product CLI into the client at build time.
|
|
2
|
+
|
|
3
|
+
The release runtime ships ``scripts/shakerscan_mcp.py`` (``scanner.sh mcp``) and
|
|
4
|
+
``scripts/v2_cli.py`` (``scanner.sh hunt``) as standalone files. The client is that same code
|
|
5
|
+
installed without the engine. Rather than committing copies that drift, the build maps them from
|
|
6
|
+
the repository checkout into the package:
|
|
7
|
+
|
|
8
|
+
- wheel: ``../scripts/shakerscan_mcp.py`` -> ``shakerscan/_mcp.py`` (and ``v2_cli.py`` -> ``_v2_cli.py``)
|
|
9
|
+
- sdist: the same files under ``src/shakerscan/`` so a wheel built from the sdist carries them
|
|
10
|
+
|
|
11
|
+
A wheel built from an unpacked sdist has no repository beside it; the copies are already in
|
|
12
|
+
``src/`` and nothing is mapped. A build that can find neither fails rather than ship a client
|
|
13
|
+
without its adapter.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
try:
|
|
21
|
+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
22
|
+
except ImportError: # the pure helpers are importable (and tested) without a build backend
|
|
23
|
+
BuildHookInterface = object # type: ignore[assignment,misc]
|
|
24
|
+
|
|
25
|
+
VENDORED = {"shakerscan_mcp.py": "_mcp.py", "v2_cli.py": "_v2_cli.py"}
|
|
26
|
+
REPOSITORY_MARKERS = ("VERSION", "scanner.sh")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def repository_scripts(root: Path) -> Path | None:
|
|
30
|
+
"""The repository's ``scripts/`` directory when ``root`` is ``<repo>/client``, else None."""
|
|
31
|
+
repo = Path(root).resolve().parent
|
|
32
|
+
if all((repo / marker).is_file() for marker in REPOSITORY_MARKERS) and (repo / "scripts").is_dir():
|
|
33
|
+
return repo / "scripts"
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def plan_force_include(target_name: str, root: Path) -> dict[str, str]:
|
|
38
|
+
"""Source path -> distribution path for the vendored runtime modules of one build target."""
|
|
39
|
+
root = Path(root)
|
|
40
|
+
prefix = "src/shakerscan/" if target_name == "sdist" else "shakerscan/"
|
|
41
|
+
scripts = repository_scripts(root)
|
|
42
|
+
if scripts is not None:
|
|
43
|
+
missing = [name for name in VENDORED if not (scripts / name).is_file()]
|
|
44
|
+
if missing:
|
|
45
|
+
raise RuntimeError(f"vendored runtime sources are missing from the repository: {missing}")
|
|
46
|
+
return {str(scripts / name): prefix + module for name, module in VENDORED.items()}
|
|
47
|
+
copies = [module for module in VENDORED.values() if (root / "src" / "shakerscan" / module).is_file()]
|
|
48
|
+
if len(copies) == len(VENDORED):
|
|
49
|
+
return {}
|
|
50
|
+
raise RuntimeError(
|
|
51
|
+
"vendored runtime sources not found: build from the repository checkout (../scripts) or "
|
|
52
|
+
"from an sdist that carries src/shakerscan/_mcp.py and src/shakerscan/_v2_cli.py"
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class CustomBuildHook(BuildHookInterface): # type: ignore[misc]
|
|
57
|
+
def initialize(self, version: str, build_data: dict) -> None: # noqa: ARG002
|
|
58
|
+
mapping = plan_force_include(self.target_name, Path(self.root))
|
|
59
|
+
build_data.setdefault("force_include", {}).update(mapping)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "shakerscan"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "ShakerScan client: the MCP adapter and Hunt CLI for a ShakerScan instance, without the engine"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "AGPL-3.0-only"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [{ name = "ShakerScan" }]
|
|
13
|
+
keywords = ["shakerscan", "security", "dast", "pentest", "mcp", "hunt"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: Information Technology",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Topic :: Security",
|
|
21
|
+
]
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://shakerscan.com"
|
|
26
|
+
Source = "https://github.com/andriyze/shakerscan"
|
|
27
|
+
Documentation = "https://github.com/andriyze/shakerscan/blob/main/docs/client.md"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
shakerscan = "shakerscan.cli:main"
|
|
31
|
+
|
|
32
|
+
[tool.hatch.version]
|
|
33
|
+
path = "src/shakerscan/__init__.py"
|
|
34
|
+
|
|
35
|
+
[tool.hatch.build.targets.wheel]
|
|
36
|
+
packages = ["src/shakerscan"]
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.sdist]
|
|
39
|
+
include = ["src/shakerscan", "README.md", "pyproject.toml", "hatch_build.py"]
|
|
40
|
+
|
|
41
|
+
# Vendors the runtime's MCP adapter and product CLI into the package at build time (hatch_build.py).
|
|
42
|
+
[tool.hatch.build.hooks.custom]
|