patchops 1.0.0__tar.gz → 1.0.2__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.
- {patchops-1.0.0/patchops.egg-info → patchops-1.0.2}/PKG-INFO +1 -1
- patchops-1.0.2/patchops/__init__.py +1 -0
- {patchops-1.0.0 → patchops-1.0.2}/patchops/cli.py +15 -13
- {patchops-1.0.0 → patchops-1.0.2/patchops.egg-info}/PKG-INFO +1 -1
- {patchops-1.0.0 → patchops-1.0.2}/setup.py +1 -1
- patchops-1.0.0/patchops/__init__.py +0 -1
- {patchops-1.0.0 → patchops-1.0.2}/MANIFEST.in +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/__pycache__/auth.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/__pycache__/config.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/__pycache__/db_utils.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/__pycache__/init_db.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/__pycache__/reports.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/analytics.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/api_client.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/app.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/auth.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/cache_manager.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/config.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/db_utils.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/email_service.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/file_manager.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/init_db.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/logger.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/payment_gateway.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/reports.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/search_engine.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/tests/smoke_test.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/tests/test_suite.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/users.db +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/utils.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/PatchOps-Target/validator.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/README.md +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/frontend/README.md +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/frontend/index.html +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/frontend/script.js +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/frontend/server.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/frontend/style.css +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/code_analyzer/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/code_analyzer/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/code_analyzer/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/code_analyzer/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/component_tester/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/component_tester/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/exploit_crafter/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/exploit_crafter/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/exploit_crafter/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/exploit_crafter/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/graph_builder/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/graph_builder/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/neighbor_resolver/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/neighbor_resolver/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/orchestrator/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/orchestrator/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/patch_writer/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/patch_writer/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/patch_writer/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/patch_writer/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/pr_generator/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/pr_generator/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/pr_generator/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/pr_generator/__pycache__/template.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/pr_generator/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/pr_generator/template.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/requirements_checker/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/requirements_checker/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/security_reviewer/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/security_reviewer/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/security_reviewer/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/security_reviewer/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/shared/__init__.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/shared/__pycache__/__init__.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/shared/__pycache__/utils.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/shared/utils.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/system_tester/__pycache__/handler.cpython-311.pyc +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/lambdas/system_tester/handler.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/patchops.egg-info/SOURCES.txt +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/patchops.egg-info/dependency_links.txt +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/patchops.egg-info/entry_points.txt +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/patchops.egg-info/requires.txt +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/patchops.egg-info/top_level.txt +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/pipeline_api.py +0 -0
- {patchops-1.0.0 → patchops-1.0.2}/setup.cfg +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.2"
|
|
@@ -7,9 +7,13 @@ import webbrowser
|
|
|
7
7
|
import uvicorn
|
|
8
8
|
import patchops
|
|
9
9
|
|
|
10
|
-
@click.
|
|
10
|
+
@click.group()
|
|
11
11
|
def cli():
|
|
12
|
-
|
|
12
|
+
pass
|
|
13
|
+
|
|
14
|
+
@cli.command()
|
|
15
|
+
def scan():
|
|
16
|
+
"""Scan current repo for vulnerabilities, patch, and open a PR"""
|
|
13
17
|
click.echo("╔══════════════════════════════════════════╗")
|
|
14
18
|
click.echo("║ 🛡 PatchOps — Autonomous Security CLI ║")
|
|
15
19
|
click.echo("║ Detect → Exploit → Patch → PR ║")
|
|
@@ -24,9 +28,8 @@ def cli():
|
|
|
24
28
|
os.environ["GITHUB_TOKEN"] = github_token
|
|
25
29
|
|
|
26
30
|
target = os.getcwd()
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
github_repo = "khushidubeyokok/PatchOpsTarget" # Fallback
|
|
31
|
+
|
|
32
|
+
github_repo = "khushidubeyokok/PatchOpsTarget"
|
|
30
33
|
try:
|
|
31
34
|
result = subprocess.run(
|
|
32
35
|
["git", "remote", "get-url", "origin"],
|
|
@@ -35,34 +38,33 @@ def cli():
|
|
|
35
38
|
raw_url = result.stdout.strip()
|
|
36
39
|
if raw_url:
|
|
37
40
|
if "github.com/" in raw_url:
|
|
38
|
-
github_repo = raw_url.split("github.com/")[1].replace(".git", "")
|
|
41
|
+
github_repo = raw_url.split("github.com/")[1].replace(".git", "").strip()
|
|
39
42
|
elif "github.com:" in raw_url:
|
|
40
|
-
github_repo = raw_url.split("github.com:")[1].replace(".git", "")
|
|
43
|
+
github_repo = raw_url.split("github.com:")[1].replace(".git", "").strip()
|
|
41
44
|
except Exception:
|
|
42
45
|
pass
|
|
43
46
|
|
|
44
47
|
os.environ["PATCHOPS_TARGET"] = target
|
|
45
48
|
os.environ["GITHUB_REPO"] = github_repo
|
|
46
49
|
|
|
47
|
-
# Find the package's own installed location so uvicorn can find pipeline_api.py
|
|
48
50
|
package_dir = os.path.dirname(os.path.abspath(patchops.__file__))
|
|
49
51
|
base_dir = os.path.dirname(package_dir)
|
|
50
52
|
os.chdir(base_dir)
|
|
53
|
+
sys.path.insert(0, base_dir)
|
|
51
54
|
|
|
52
55
|
click.echo(f"→ Target: {target}")
|
|
53
56
|
click.echo(f"→ Repo: {github_repo}")
|
|
54
57
|
click.echo(f"→ Dashboard: http://localhost:8000")
|
|
55
58
|
click.echo("→ Press Ctrl+C to stop")
|
|
59
|
+
click.echo("")
|
|
56
60
|
|
|
57
61
|
threading.Timer(2.0, lambda: webbrowser.open("http://localhost:8000")).start()
|
|
58
62
|
|
|
59
63
|
try:
|
|
60
|
-
|
|
64
|
+
from pipeline_api import app as pipeline_app
|
|
65
|
+
uvicorn.run(pipeline_app, host="0.0.0.0", port=8000, reload=False)
|
|
61
66
|
except KeyboardInterrupt:
|
|
62
67
|
click.echo("\nPatchOps stopped.")
|
|
63
68
|
|
|
64
69
|
def main():
|
|
65
|
-
cli()
|
|
66
|
-
|
|
67
|
-
if __name__ == "__main__":
|
|
68
|
-
main()
|
|
70
|
+
cli()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
python__version__ = "1.0.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/code_analyzer/__pycache__/__init__.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/component_tester/__pycache__/handler.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/exploit_crafter/__pycache__/__init__.cpython-311.pyc
RENAMED
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/exploit_crafter/__pycache__/handler.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/neighbor_resolver/__pycache__/handler.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/requirements_checker/__pycache__/handler.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/security_reviewer/__pycache__/__init__.cpython-311.pyc
RENAMED
|
File without changes
|
{patchops-1.0.0 → patchops-1.0.2}/lambdas/security_reviewer/__pycache__/handler.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|