codewatch-scan 0.1.0__py3-none-any.whl
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.
- codewatch/__init__.py +0 -0
- codewatch/__main__.py +14 -0
- codewatch/asgi.py +16 -0
- codewatch/settings.py +175 -0
- codewatch/urls.py +40 -0
- codewatch/wsgi.py +16 -0
- codewatch_scan-0.1.0.dist-info/METADATA +81 -0
- codewatch_scan-0.1.0.dist-info/RECORD +136 -0
- codewatch_scan-0.1.0.dist-info/WHEEL +5 -0
- codewatch_scan-0.1.0.dist-info/entry_points.txt +4 -0
- codewatch_scan-0.1.0.dist-info/licenses/LICENSE +21 -0
- codewatch_scan-0.1.0.dist-info/top_level.txt +2 -0
- core/__init__.py +0 -0
- core/analyzers/__init__.py +19 -0
- core/analyzers/accessibility.py +199 -0
- core/analyzers/base.py +192 -0
- core/analyzers/body_models.py +154 -0
- core/analyzers/codewatch_checks.py +394 -0
- core/analyzers/constant_branches.py +251 -0
- core/analyzers/containers.py +316 -0
- core/analyzers/coverage.py +131 -0
- core/analyzers/dependencies.py +347 -0
- core/analyzers/drf_serializers.py +65 -0
- core/analyzers/else_branches.py +106 -0
- core/analyzers/extra.py +400 -0
- core/analyzers/flask_resources.py +65 -0
- core/analyzers/inline_scripts.py +50 -0
- core/analyzers/jinja_sandboxes.py +63 -0
- core/analyzers/match_statements.py +148 -0
- core/analyzers/multi_tools.py +888 -0
- core/analyzers/php_template_sinks.py +444 -0
- core/analyzers/project_checks.py +150 -0
- core/analyzers/python_tools.py +333 -0
- core/analyzers/route_converters.py +237 -0
- core/analyzers/slices.py +94 -0
- core/analyzers/starred_targets.py +42 -0
- core/analyzers/stored_fields.py +386 -0
- core/analyzers/summaries.py +1387 -0
- core/analyzers/template_sinks.py +162 -0
- core/api.py +360 -0
- core/apps.py +6 -0
- core/benchmark.py +955 -0
- core/bundled/catalog/codewatch/rules/javascript-crypto.yml +224 -0
- core/bundled/catalog/codewatch/rules/javascript-injection.yml +116 -0
- core/bundled/catalog/codewatch/rules/javascript-taint.yml +1539 -0
- core/bundled/catalog/codewatch/rules/javascript-web.yml +562 -0
- core/bundled/catalog/codewatch/rules/php-web.yml +719 -0
- core/bundled/catalog/codewatch/rules/python-crypto.yml +203 -0
- core/bundled/catalog/codewatch/rules/python-django.yml +267 -0
- core/bundled/catalog/codewatch/rules/python-injection.yml +115 -0
- core/bundled/catalog/codewatch/rules/python-web.yml +3382 -0
- core/bundled/catalog/custom/mappings.json +360 -0
- core/bundled/catalog/custom/overrides.json +4 -0
- core/bundled/catalog/custom/rules/django-settings.yml +19 -0
- core/bundled/catalog/imported/changes.json +5 -0
- core/bundled/catalog/imported/docs.json +1143 -0
- core/bundled/catalog/imported/meta.json +54 -0
- core/bundled/catalog/imported/rules.json +85421 -0
- core/bundled/catalog/imported/standards.json +11191 -0
- core/bundled/tools/analyzers.lock +786 -0
- core/bundled/tools/axe-scan.mjs +45 -0
- core/bundled/tools/checkov.lock +2463 -0
- core/bundled/tools/codewatch-checks.mjs +99 -0
- core/bundled/tools/eslint-a11y.config.js +16 -0
- core/bundled/tools/eslint-quality.config.js +63 -0
- core/bundled/tools/eslint-typed.config.js +18 -0
- core/bundled/tools/package-lock.json +6102 -0
- core/bundled/tools/package.json +32 -0
- core/bundled/tools/rule-metadata.mjs +56 -0
- core/bundled/tools/semgrep.lock +1232 -0
- core/bundled/tools/stylelint.config.json +11 -0
- core/catalog/__init__.py +190 -0
- core/catalog/build.py +84 -0
- core/catalog/merge.py +122 -0
- core/catalog/sources.py +418 -0
- core/catalog/standards.py +119 -0
- core/catalog/update.py +99 -0
- core/catalog_views.py +115 -0
- core/client.py +645 -0
- core/collect.py +518 -0
- core/duplicates.py +60 -0
- core/fingerprint.py +25 -0
- core/folders.py +73 -0
- core/gate.py +77 -0
- core/git.py +149 -0
- core/jobs.py +86 -0
- core/management/__init__.py +0 -0
- core/management/commands/__init__.py +0 -0
- core/management/commands/addproject.py +40 -0
- core/management/commands/buildcatalog.py +15 -0
- core/management/commands/scan.py +74 -0
- core/management/commands/updatecatalog.py +14 -0
- core/mcp_server.py +140 -0
- core/middleware.py +17 -0
- core/migrations/0001_initial.py +115 -0
- core/migrations/0002_auth_tokens_a11y.py +60 -0
- core/migrations/0003_default_admin.py +43 -0
- core/migrations/0004_project_members.py +28 -0
- core/migrations/0005_uploads_and_sources.py +55 -0
- core/migrations/0006_thresholds.py +28 -0
- core/migrations/0007_also_reported_by.py +18 -0
- core/migrations/0008_new_code_period.py +18 -0
- core/migrations/0009_resolution_safe.py +18 -0
- core/migrations/0010_analysis_progress.py +18 -0
- core/migrations/0011_overall_gate_conditions.py +20 -0
- core/migrations/__init__.py +0 -0
- core/models.py +323 -0
- core/network.py +41 -0
- core/paths.py +29 -0
- core/ratings.py +67 -0
- core/runner.py +168 -0
- core/templates/core/account.html +30 -0
- core/templates/core/analysis.html +49 -0
- core/templates/core/base.html +121 -0
- core/templates/core/form_table.html +12 -0
- core/templates/core/gate_badge.html +1 -0
- core/templates/core/index.html +26 -0
- core/templates/core/issues.html +38 -0
- core/templates/core/login.html +13 -0
- core/templates/core/new_project.html +27 -0
- core/templates/core/password_change.html +10 -0
- core/templates/core/project.html +40 -0
- core/templates/core/rating.html +1 -0
- core/templates/core/ratings.html +32 -0
- core/templates/core/rule.html +33 -0
- core/templates/core/rules.html +42 -0
- core/templates/core/scan_progress.html +2 -0
- core/templates/core/settings.html +36 -0
- core/templates/core/source.html +15 -0
- core/templates/core/standards.html +30 -0
- core/templates/core/user_edit.html +15 -0
- core/templates/core/users.html +18 -0
- core/templatetags/__init__.py +0 -0
- core/templatetags/codewatch.py +42 -0
- core/tool_setup.py +68 -0
- core/views.py +564 -0
codewatch/__init__.py
ADDED
|
File without changes
|
codewatch/__main__.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""`python -m codewatch`: Django's manage.py, which an installed package doesn't have."""
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def main():
|
|
7
|
+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codewatch.settings")
|
|
8
|
+
from django.core.management import execute_from_command_line
|
|
9
|
+
|
|
10
|
+
execute_from_command_line(sys.argv)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
main()
|
codewatch/asgi.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ASGI config for codewatch project.
|
|
3
|
+
|
|
4
|
+
It exposes the ASGI callable as a module-level variable named ``application``.
|
|
5
|
+
|
|
6
|
+
For more information on this file, see
|
|
7
|
+
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from django.core.asgi import get_asgi_application
|
|
13
|
+
|
|
14
|
+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'codewatch.settings')
|
|
15
|
+
|
|
16
|
+
application = get_asgi_application()
|
codewatch/settings.py
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Django settings for codewatch project.
|
|
3
|
+
|
|
4
|
+
Generated by 'django-admin startproject' using Django 5.2.18.
|
|
5
|
+
|
|
6
|
+
For more information on this file, see
|
|
7
|
+
https://docs.djangoproject.com/en/5.2/topics/settings/
|
|
8
|
+
|
|
9
|
+
For the full list of settings and their values, see
|
|
10
|
+
https://docs.djangoproject.com/en/5.2/ref/settings/
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import os
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from django.core.management.utils import get_random_secret_key
|
|
17
|
+
|
|
18
|
+
from core import paths
|
|
19
|
+
|
|
20
|
+
# Build paths inside the project like this: BASE_DIR / 'subdir'.
|
|
21
|
+
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# Quick-start development settings - unsuitable for production
|
|
25
|
+
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
|
|
26
|
+
|
|
27
|
+
CODEWATCH_CACHE = Path(os.environ.get("CODEWATCH_CACHE", Path.home() / ".cache" / "codewatch"))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def stored_secret_key():
|
|
31
|
+
"""CODEWATCH_SECRET_KEY, else one generated once and kept where only this account can read it: a new key on
|
|
32
|
+
every start signed everyone out, and differed between worker processes."""
|
|
33
|
+
path = CODEWATCH_CACHE / "secret_key"
|
|
34
|
+
try:
|
|
35
|
+
return path.read_text().strip()
|
|
36
|
+
except FileNotFoundError:
|
|
37
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
38
|
+
key = get_random_secret_key()
|
|
39
|
+
try:
|
|
40
|
+
with os.fdopen(os.open(path, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600), "w") as out:
|
|
41
|
+
out.write(key)
|
|
42
|
+
except FileExistsError: # another process started at the same moment and wrote one
|
|
43
|
+
return path.read_text().strip()
|
|
44
|
+
return key
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
SECRET_KEY = os.environ.get("CODEWATCH_SECRET_KEY") or stored_secret_key()
|
|
48
|
+
|
|
49
|
+
# Off unless asked for: debug pages show settings and code to anyone who can trigger an error.
|
|
50
|
+
DEBUG = os.environ.get("CODEWATCH_DEBUG") == "1"
|
|
51
|
+
|
|
52
|
+
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "[::1]",
|
|
53
|
+
*(h.strip() for h in os.environ.get("CODEWATCH_ALLOWED_HOSTS", "").split(",") if h.strip())]
|
|
54
|
+
|
|
55
|
+
# Behind HTTPS (CODEWATCH_HTTPS=1): cookies only over HTTPS, and browsers told to stay on it.
|
|
56
|
+
HTTPS = os.environ.get("CODEWATCH_HTTPS") == "1"
|
|
57
|
+
SESSION_COOKIE_SECURE = CSRF_COOKIE_SECURE = HTTPS
|
|
58
|
+
SECURE_HSTS_SECONDS = 31536000 if HTTPS else 0
|
|
59
|
+
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") if HTTPS else None
|
|
60
|
+
X_FRAME_OPTIONS = "DENY"
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Application definition
|
|
64
|
+
|
|
65
|
+
INSTALLED_APPS = [
|
|
66
|
+
'django.contrib.admin',
|
|
67
|
+
'django.contrib.auth',
|
|
68
|
+
'django.contrib.contenttypes',
|
|
69
|
+
'django.contrib.sessions',
|
|
70
|
+
'django.contrib.messages',
|
|
71
|
+
'django.contrib.staticfiles',
|
|
72
|
+
'core',
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
MIDDLEWARE = [
|
|
76
|
+
'django.middleware.security.SecurityMiddleware',
|
|
77
|
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
|
78
|
+
'django.middleware.common.CommonMiddleware',
|
|
79
|
+
'django.middleware.csrf.CsrfViewMiddleware',
|
|
80
|
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
|
81
|
+
'django.contrib.auth.middleware.LoginRequiredMiddleware',
|
|
82
|
+
'core.middleware.ForcePasswordChangeMiddleware',
|
|
83
|
+
'django.contrib.messages.middleware.MessageMiddleware',
|
|
84
|
+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
ROOT_URLCONF = 'codewatch.urls'
|
|
88
|
+
|
|
89
|
+
TEMPLATES = [
|
|
90
|
+
{
|
|
91
|
+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
|
92
|
+
'DIRS': [],
|
|
93
|
+
'APP_DIRS': True,
|
|
94
|
+
'OPTIONS': {
|
|
95
|
+
'context_processors': [
|
|
96
|
+
'django.template.context_processors.request',
|
|
97
|
+
'django.contrib.auth.context_processors.auth',
|
|
98
|
+
'django.contrib.messages.context_processors.messages',
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
]
|
|
103
|
+
|
|
104
|
+
WSGI_APPLICATION = 'codewatch.wsgi.application'
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# Database
|
|
108
|
+
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def default_database():
|
|
112
|
+
"""db.sqlite3 beside a source checkout; for an installed package, in the data folder (site-packages may not be
|
|
113
|
+
writable, and an upgrade would replace it)."""
|
|
114
|
+
if not paths.INSTALLED:
|
|
115
|
+
return BASE_DIR / 'db.sqlite3'
|
|
116
|
+
paths.DATA_HOME.mkdir(parents=True, exist_ok=True)
|
|
117
|
+
return paths.DATA_HOME / 'db.sqlite3'
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
DATABASES = {
|
|
121
|
+
'default': {
|
|
122
|
+
'ENGINE': 'django.db.backends.sqlite3',
|
|
123
|
+
# CODEWATCH_DB: where the database lives (a mounted volume in a container).
|
|
124
|
+
'NAME': os.environ.get('CODEWATCH_DB') or default_database(),
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Password validation
|
|
130
|
+
# https://docs.djangoproject.com/en/5.2/ref/settings/#auth-password-validators
|
|
131
|
+
|
|
132
|
+
AUTH_PASSWORD_VALIDATORS = [
|
|
133
|
+
{
|
|
134
|
+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
|
144
|
+
},
|
|
145
|
+
]
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
# Internationalization
|
|
149
|
+
# https://docs.djangoproject.com/en/5.2/topics/i18n/
|
|
150
|
+
|
|
151
|
+
LANGUAGE_CODE = 'en-us'
|
|
152
|
+
|
|
153
|
+
TIME_ZONE = 'UTC'
|
|
154
|
+
|
|
155
|
+
USE_I18N = True
|
|
156
|
+
|
|
157
|
+
USE_TZ = True
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
# Static files (CSS, JavaScript, Images)
|
|
161
|
+
# https://docs.djangoproject.com/en/5.2/howto/static-files/
|
|
162
|
+
|
|
163
|
+
STATIC_URL = 'static/'
|
|
164
|
+
|
|
165
|
+
# Default primary key field type
|
|
166
|
+
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
|
|
167
|
+
|
|
168
|
+
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
|
169
|
+
|
|
170
|
+
LOGIN_URL = "login"
|
|
171
|
+
LOGIN_REDIRECT_URL = "index"
|
|
172
|
+
LOGOUT_REDIRECT_URL = "login"
|
|
173
|
+
CODEWATCH_MAX_COVERAGE_UPLOAD = 50 * 1024 * 1024
|
|
174
|
+
# codewatch-scan uploads carry issues plus the source of files with issues (gzip-compressed).
|
|
175
|
+
DATA_UPLOAD_MAX_MEMORY_SIZE = 200 * 1024 * 1024
|
codewatch/urls.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from django.contrib.auth import views as auth_views
|
|
2
|
+
from django.urls import path
|
|
3
|
+
|
|
4
|
+
from core import api, catalog_views, views
|
|
5
|
+
|
|
6
|
+
urlpatterns = [
|
|
7
|
+
path("", views.index, name="index"),
|
|
8
|
+
path("login/", views.ThrottledLoginView.as_view(), name="login"),
|
|
9
|
+
path("logout/", auth_views.LogoutView.as_view(), name="logout"),
|
|
10
|
+
path("account/", views.account, name="account"),
|
|
11
|
+
path("account/password/", views.ChangePasswordView.as_view(), name="password_change"),
|
|
12
|
+
path("users/", views.users, name="users"),
|
|
13
|
+
path("users/<int:pk>/", views.user_edit, name="user_edit"),
|
|
14
|
+
path("projects/new/", views.new_project, name="new_project"),
|
|
15
|
+
path("rules/", catalog_views.rules, name="rules"),
|
|
16
|
+
path("rules/update/", catalog_views.update_rules, name="update_rules"),
|
|
17
|
+
path("rules/<path:rule_id>/", catalog_views.rule_detail, name="rule"),
|
|
18
|
+
path("standards/", catalog_views.standards, name="standards"),
|
|
19
|
+
path("ratings/", catalog_views.ratings_help, name="ratings"),
|
|
20
|
+
path("p/<slug:key>/", views.project_detail, name="project"),
|
|
21
|
+
path("p/<slug:key>/scan/", views.start_scan, name="scan"),
|
|
22
|
+
path("p/<slug:key>/settings/", views.project_settings, name="settings"),
|
|
23
|
+
path("p/<slug:key>/members/", views.project_members, name="members"),
|
|
24
|
+
path("p/<slug:key>/delete/", views.delete_project, name="delete_project"),
|
|
25
|
+
path("p/<slug:key>/resolve/", views.resolve_issue, name="resolve"),
|
|
26
|
+
path("p/<slug:key>/a/<int:pk>/", views.analysis_detail, name="analysis"),
|
|
27
|
+
path("p/<slug:key>/a/<int:pk>/issues/", views.issue_list, name="issues"),
|
|
28
|
+
path("p/<slug:key>/a/<int:pk>/source/", views.source_view, name="source"),
|
|
29
|
+
path("api/projects/", api.projects),
|
|
30
|
+
path("api/projects/<slug:key>/", api.project),
|
|
31
|
+
path("api/projects/<slug:key>/config/", api.project_config),
|
|
32
|
+
path("api/projects/<slug:key>/status/", api.status),
|
|
33
|
+
path("api/projects/<slug:key>/issues/", api.issues),
|
|
34
|
+
path("api/projects/<slug:key>/analyses/", api.upload),
|
|
35
|
+
path("api/projects/<slug:key>/scan/", api.server_scan),
|
|
36
|
+
path("api/analyses/<int:pk>/", api.analysis),
|
|
37
|
+
path("api/issues/<int:pk>/", api.issue_detail),
|
|
38
|
+
path("api/issues/<int:pk>/resolve/", api.resolve),
|
|
39
|
+
path("api/rules/<path:rule_id>/", api.rule),
|
|
40
|
+
]
|
codewatch/wsgi.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""
|
|
2
|
+
WSGI config for codewatch project.
|
|
3
|
+
|
|
4
|
+
It exposes the WSGI callable as a module-level variable named ``application``.
|
|
5
|
+
|
|
6
|
+
For more information on this file, see
|
|
7
|
+
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from django.core.wsgi import get_wsgi_application
|
|
13
|
+
|
|
14
|
+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'codewatch.settings')
|
|
15
|
+
|
|
16
|
+
application = get_wsgi_application()
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codewatch-scan
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Security and quality checks for Python web apps (Django, Flask, FastAPI) and the JavaScript they ship
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/shwan-ps5/codewatch
|
|
7
|
+
Project-URL: Source, https://github.com/shwan-ps5/codewatch
|
|
8
|
+
Project-URL: Issues, https://github.com/shwan-ps5/codewatch/issues
|
|
9
|
+
Project-URL: Benchmarks, https://github.com/shwan-ps5/codewatch/blob/detection-gaps/docs/benchmarks.md
|
|
10
|
+
Keywords: security,sast,static-analysis,semgrep,django,flask,fastapi,code-quality
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Framework :: Django
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.12
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: Django<6,>=5.2
|
|
24
|
+
Requires-Dist: ruff==0.17.3
|
|
25
|
+
Requires-Dist: radon==6.0.1
|
|
26
|
+
Requires-Dist: bandit==1.9.4
|
|
27
|
+
Requires-Dist: lizard==1.24.3
|
|
28
|
+
Requires-Dist: pip-audit==2.10.1
|
|
29
|
+
Requires-Dist: complexipy==8.3.0
|
|
30
|
+
Requires-Dist: basedpyright==1.40.2
|
|
31
|
+
Requires-Dist: detect-secrets==1.5.0
|
|
32
|
+
Requires-Dist: markdown-it-py
|
|
33
|
+
Requires-Dist: PyYAML
|
|
34
|
+
Requires-Dist: defusedxml
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-django; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-xdist; extra == "dev"
|
|
39
|
+
Requires-Dist: coverage; extra == "dev"
|
|
40
|
+
Provides-Extra: mcp
|
|
41
|
+
Requires-Dist: mcp<2,>=1.30; extra == "mcp"
|
|
42
|
+
Dynamic: license-file
|
|
43
|
+
|
|
44
|
+
# codewatch-scan
|
|
45
|
+
|
|
46
|
+
Security and quality checks for Python web apps (Django, Flask, FastAPI) and the JavaScript they ship, built on
|
|
47
|
+
open-source analyzers (Semgrep with codewatch's own taint rules, ruff, bandit, ESLint, checkov, detect-secrets,
|
|
48
|
+
pip-audit and more). It runs locally and uploads nothing.
|
|
49
|
+
|
|
50
|
+
**Alpha.** The rules are still being written, and the commands and output may change. On real Python CVE fixes it
|
|
51
|
+
was never tuned on, it finds about 28% (11 of 40, in verdict mode). Benchmarks, method and caveats are at
|
|
52
|
+
[github.com/shwan-ps5/codewatch](https://github.com/shwan-ps5/codewatch#how-well-it-works).
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pipx install codewatch-scan # or: pip install codewatch-scan, in a virtualenv
|
|
58
|
+
codewatch setup # Semgrep and checkov (each in its own venv) and the Node analyzers
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`codewatch setup` installs every analyzer at the version and hash codewatch is tested with, into
|
|
62
|
+
`~/.local/share/codewatch/tools` (`CODEWATCH_TOOLS` moves it). The Node analyzers need Node.js 20 or later.
|
|
63
|
+
Linux and macOS; on Windows, use the Docker image from the repository.
|
|
64
|
+
|
|
65
|
+
## Use
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cd your-repo
|
|
69
|
+
codewatch check --all # every file; issues are listed, blocking ones marked !
|
|
70
|
+
codewatch check # only the files you changed, and only issues on changed lines block
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The exit code is 1 when a bug, a vulnerability or a blocker/critical issue blocks, and 2 when an analyzer failed or
|
|
74
|
+
isn't installed, so the files weren't fully checked. `codewatch init --hook pre-commit` installs a git hook
|
|
75
|
+
that checks each commit's staged files.
|
|
76
|
+
|
|
77
|
+
The self-hosted server (history, new-code tracking, quality gates) also ships in this package
|
|
78
|
+
(`python -m codewatch migrate`, then `python -m codewatch runserver`), but the repository's Docker image is the
|
|
79
|
+
easier way to run it.
|
|
80
|
+
|
|
81
|
+
Licence: MIT.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
codewatch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
codewatch/__main__.py,sha256=_lWOvLAJwGG4KRAZLkGmDUj2AKT2gwtD5ZVaY6SEEno,345
|
|
3
|
+
codewatch/asgi.py,sha256=ps68lfYGEl81Wuk1jbIEFU0wkuYXEYX6AkwUvhw9zks,395
|
|
4
|
+
codewatch/settings.py,sha256=v6aRMPCLfGyZjv3NcbDqpXv9s8Bh9hfuqzGg1nQPvU4,5448
|
|
5
|
+
codewatch/urls.py,sha256=vOEcjwAgVNtI7EumZFZIU-1BmV2KsWt1gc1g57vRZnY,2245
|
|
6
|
+
codewatch/wsgi.py,sha256=VyaxgCgehW5V1TwG9KG5D1TUBYf-VQvACHEVTKEuLAI,395
|
|
7
|
+
codewatch_scan-0.1.0.dist-info/licenses/LICENSE,sha256=COuaMVwF451s6HSwNpohvkj-8plTxhE5Mm25QRRWUzA,1062
|
|
8
|
+
core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
core/api.py,sha256=027FxzA12_irUw3EV0-XjbtzspxEx_FTg1Hn2xec1r8,14296
|
|
10
|
+
core/apps.py,sha256=EBiVWDWU29sHw6RGTYtn9TmQat8cx-NFoyN4Q6DolcI,140
|
|
11
|
+
core/benchmark.py,sha256=C4GeJ6v2DR_8q2VCdNr4vms2f0kpO6xpTOkntavGl0Y,46552
|
|
12
|
+
core/catalog_views.py,sha256=9wj4DOtLfZoWXqbYc-GMmGCBQI8ieUOpM59lYtNg4DI,4892
|
|
13
|
+
core/client.py,sha256=dnS6fdJxus4gN6KtqghBy3EVjksKdcNbnHlql7DMzHM,28414
|
|
14
|
+
core/collect.py,sha256=9bSjuCGScNrJsAp6sCtHAQLKHRI7PBnBTDBHuWy3beg,21224
|
|
15
|
+
core/duplicates.py,sha256=fMRl1MjLKB8hs4e6xxapeuA7l9FusRwB0-PbbBV_WZo,2847
|
|
16
|
+
core/fingerprint.py,sha256=x8-AxDRvfiFylUGMiIwBhPcL3TwVrZ7KMqIBeFV88hA,1164
|
|
17
|
+
core/folders.py,sha256=2Z22ZsYHsckAV0Lp5wSnGRmgaaP3KQcUcjkxGDZY2AA,2635
|
|
18
|
+
core/gate.py,sha256=ZeKO1-6XGt88z070KMNG2UhI-P5op69ByXXsLWrPv18,3156
|
|
19
|
+
core/git.py,sha256=7Hx4dYCs0tOONBpbfNSSiHlJhII1LGywKs4Zcqra_Og,6611
|
|
20
|
+
core/jobs.py,sha256=QH1u31pbVOtkk_DifybJHN2xZvqVGDiae9kHoU2hxDk,3936
|
|
21
|
+
core/mcp_server.py,sha256=wDAgTX0a6ICi436gR60OJhr5oKDPCHnh9-leMEmhrwE,5663
|
|
22
|
+
core/middleware.py,sha256=by085JUs0BEkR7Yox4hVm3mVle24iSYDgNjCDrVfQGE,721
|
|
23
|
+
core/models.py,sha256=7EQIpAw6qcOISTCyn-tPrV1WuInQImaCu0dBQ6kcigM,13548
|
|
24
|
+
core/network.py,sha256=xN4UVX43K-W1QZvJipROkF2CuUuKVUjq5zEt_Cb6L2k,1662
|
|
25
|
+
core/paths.py,sha256=M3cn024EHtOojLweAj6dOiA4lJeKvEiGV59LfgQtqDE,1260
|
|
26
|
+
core/ratings.py,sha256=0xmaIAAVtJW17K_Y6Zs9xqGMGCQlqpbQhbx1eQNaESY,3137
|
|
27
|
+
core/runner.py,sha256=P3rdhbhR-jq7sm5Ty39Ma5d1ILn6gX2lpqH_YPeVGG0,6823
|
|
28
|
+
core/tool_setup.py,sha256=J6E48sjg-GCPyMBnmjeYONJxfHMFAMM5jquYvXZF6Fs,2902
|
|
29
|
+
core/views.py,sha256=kajCwsvRff-7eiCiwwcQ2EgLeFvAA6PeGckXcASH_k4,23506
|
|
30
|
+
core/analyzers/__init__.py,sha256=bgrK3bhsDoaq8aNcdI4FM57bT1Ne6_1Q1kvAz4Ez3Hc,914
|
|
31
|
+
core/analyzers/accessibility.py,sha256=UsEy2sG_X5zGVbRfES15myIbJQtM4GO1FxDIc1UE3gI,8266
|
|
32
|
+
core/analyzers/base.py,sha256=n5Y9gXuvEC4jC0O2JFvkiEmipRhDZReGnFkw8O4S3_U,7277
|
|
33
|
+
core/analyzers/body_models.py,sha256=4MKxLt3B3gAfV1mKQaIUx38cbX7fOsR4EXofRUhbzdQ,7044
|
|
34
|
+
core/analyzers/codewatch_checks.py,sha256=STWfk7MmyjdOjjMCgyAj-y4_T7364dWW66n9MnzRPNU,17739
|
|
35
|
+
core/analyzers/constant_branches.py,sha256=criT-AZpFCbJ4_aQbGEuCUFAxmFdadIdohX5tegDFo0,9475
|
|
36
|
+
core/analyzers/containers.py,sha256=lI5Pk680PibwDUPODNeknZ8M43dDvAApdgpUq2v0fUM,11782
|
|
37
|
+
core/analyzers/coverage.py,sha256=-alHARR-H74JTxbOfjoL71pIYJeAPhB5ntBSr2N-hmQ,4794
|
|
38
|
+
core/analyzers/dependencies.py,sha256=_dMlYyPD-b0nWpILQOa2SCkM_s2KZYZ9QzFCCHfQnwc,14564
|
|
39
|
+
core/analyzers/drf_serializers.py,sha256=eFEOQtFOja2KEU67e8Fq9inACL_9vI4c777OBPhAz5Q,2954
|
|
40
|
+
core/analyzers/else_branches.py,sha256=_Dtw5zHMlgzfwypG2rQGquq8MyNm--o4EIEBE91J7N0,4441
|
|
41
|
+
core/analyzers/extra.py,sha256=t8pV6zn4YI5GfbnvvIMj67mCEuC0KCKdvquUMf6GrmU,17630
|
|
42
|
+
core/analyzers/flask_resources.py,sha256=oLBSd_9gWHKL55v_2EaaHpoMy89XuaS_awBgZIfgKws,3035
|
|
43
|
+
core/analyzers/inline_scripts.py,sha256=6ywTrXHoF_2_1oQhi6_kWvEpTRWRduGwU2aZsFuCU84,2588
|
|
44
|
+
core/analyzers/jinja_sandboxes.py,sha256=ipBm3y3LKanU1f-PhlvcQkHOidKeUrJZG4VkO-QZmMk,2988
|
|
45
|
+
core/analyzers/match_statements.py,sha256=lHufKnhURjdEJerqw0eXl1AdHqiPwejESbG1ZIyR6BY,5978
|
|
46
|
+
core/analyzers/multi_tools.py,sha256=uzJEjshIFzfzy33YtOf_WrneGlp4sJADvveCBgqT2lM,45664
|
|
47
|
+
core/analyzers/php_template_sinks.py,sha256=CGL75OGpGBKvXErBpG6GR3qjMRvnm7dsZWgoY9uy8uU,21811
|
|
48
|
+
core/analyzers/project_checks.py,sha256=YKqtSRguw7LTYEyeqadSrfbAfHjdsIs5nQc9VSUY4bw,7201
|
|
49
|
+
core/analyzers/python_tools.py,sha256=p5AjpsExH5tZn1O8J2XmD7Mqb_YPA6_tf4DZXQe__Do,14182
|
|
50
|
+
core/analyzers/route_converters.py,sha256=DEUHx461MaSiQDqOP49V5S8BqzemBABqENltjAE5sn0,11767
|
|
51
|
+
core/analyzers/slices.py,sha256=nvRn8XADihfANP544IphyeLGmfpIYezk_CGM1vjsvzk,3731
|
|
52
|
+
core/analyzers/starred_targets.py,sha256=t311hY9-FjISbQ99e0Bqrb621Fvs2eClk4zRM1B_uHU,2001
|
|
53
|
+
core/analyzers/stored_fields.py,sha256=Hz4hzjVlkv2BmdsS66hlue23TMOCE8wE7xxIk9uyFK4,17381
|
|
54
|
+
core/analyzers/summaries.py,sha256=Cm9dyHmLHaa0ryQpCx_8QlblZbbrFN0jnQren9zipqw,71991
|
|
55
|
+
core/analyzers/template_sinks.py,sha256=7X3kc0t9b0jP-CDdSZALNe_wzsk6s8irLaPPQNPN-6g,8952
|
|
56
|
+
core/bundled/catalog/codewatch/rules/javascript-crypto.yml,sha256=uEl4aHmlbL50_9dvaJzhnsNwotR2EBG1o3VoT8yDFa8,10695
|
|
57
|
+
core/bundled/catalog/codewatch/rules/javascript-injection.yml,sha256=gguJnruC5tTLCV9-19iDnNi4ZdkenR3bG030mNsCZSs,4844
|
|
58
|
+
core/bundled/catalog/codewatch/rules/javascript-taint.yml,sha256=0he_vxP8MH7ar8sLULeeY6Ota51guBFbSD942qyC900,74762
|
|
59
|
+
core/bundled/catalog/codewatch/rules/javascript-web.yml,sha256=Z02ze27wnQ1sslcq-WsxBCdNivw8uTGMvKsf_1Z3HMg,28060
|
|
60
|
+
core/bundled/catalog/codewatch/rules/php-web.yml,sha256=0F7-DwPS99lL3cQ2H9MEXBH13mfLC-Up7E-E5esctSw,29886
|
|
61
|
+
core/bundled/catalog/codewatch/rules/python-crypto.yml,sha256=qPktcravsnW7qgoGRqzuT5pp-_YzjMIiYwCSw0sSz6w,9069
|
|
62
|
+
core/bundled/catalog/codewatch/rules/python-django.yml,sha256=rr2xBCRa0vm-iAg6g8hcHSll7H87LqX7NcTyuzESR0Q,13937
|
|
63
|
+
core/bundled/catalog/codewatch/rules/python-injection.yml,sha256=NQKSUVFfHy300j4bhovBsY20ocFrb9X0xFxBUJBS1gQ,5170
|
|
64
|
+
core/bundled/catalog/codewatch/rules/python-web.yml,sha256=rIJEneBoA0GOaBjLK74Nt9nVrPF8I2kmM2zXVUVy5hY,159321
|
|
65
|
+
core/bundled/catalog/custom/mappings.json,sha256=FhMjqfLcWJxQuRGdYMUq70D0Q3718c7kMcttUt-_A8c,6069
|
|
66
|
+
core/bundled/catalog/custom/overrides.json,sha256=D_ilKr1jAyCjQlP85OXcA1iO7qT93JgQvGZQAfpny_g,218
|
|
67
|
+
core/bundled/catalog/custom/rules/django-settings.yml,sha256=IOF4K0twPFwZ-S5IPWAZPrVFAmELJgrhNAZuBugRzMo,947
|
|
68
|
+
core/bundled/catalog/imported/changes.json,sha256=7rCHOiu7IJv29gBhZ9mKOn3Rtefan6prRbkyUVRywQM,69
|
|
69
|
+
core/bundled/catalog/imported/docs.json,sha256=A41jLGc3ijeeOfSVrUHZ2GIgQiWmHRf7nrH8u-C4q5k,1327470
|
|
70
|
+
core/bundled/catalog/imported/meta.json,sha256=958e8zGVBsPWIF4xk9s8SgZuvj3MTALZey7F5Tp5SKc,1180
|
|
71
|
+
core/bundled/catalog/imported/rules.json,sha256=ZTYy5ugBbZuuTWsfs2V09rGTfsdZh93SX-eBmYGvWRs,2241721
|
|
72
|
+
core/bundled/catalog/imported/standards.json,sha256=jy_3RITu9ADFx6pidxIHu9tt5c-n496u3YagV5K9Lpw,607893
|
|
73
|
+
core/bundled/tools/analyzers.lock,sha256=Pu_nL3NGH6nDrqNpdRb_y4QHSv5B0srVc0oCYAdtYgk,59916
|
|
74
|
+
core/bundled/tools/axe-scan.mjs,sha256=SvsIzwiwnQoIo8_IAZNfBC6R78j4U30mQ09TD1qZ7Q4,1661
|
|
75
|
+
core/bundled/tools/checkov.lock,sha256=3dSPWGwU1bo-ntfmyw9TUpfnOfodLYJvFQIc8Namrhk,190081
|
|
76
|
+
core/bundled/tools/codewatch-checks.mjs,sha256=xdPw_D0dV9TEPveHuMzYLM3weJBtvqQxE5-h3E63VHE,4195
|
|
77
|
+
core/bundled/tools/eslint-a11y.config.js,sha256=lLLPgXNIkZGMyCLH7HnGFWCvKJrNYRyPaQp83cNh2_s,382
|
|
78
|
+
core/bundled/tools/eslint-quality.config.js,sha256=5UfEBYlfqumuJQ2ZZbdJuUZgzboztLxBK7gDAyFtv-w,2291
|
|
79
|
+
core/bundled/tools/eslint-typed.config.js,sha256=aj4DPKCoBrtGnFkWFT08imoZTh9WxoxAv7JT6BIPqAQ,645
|
|
80
|
+
core/bundled/tools/package-lock.json,sha256=ret7gBssh8j9vuegWPzweTiUr9xF3ox7VRpnGq5U8_Q,222110
|
|
81
|
+
core/bundled/tools/package.json,sha256=mYHgkrPB7pTOKreuWpZHvhQ7hCh1HBP8hMEpFouQDYU,831
|
|
82
|
+
core/bundled/tools/rule-metadata.mjs,sha256=GAx9FM_snLXtcCcYbKTkMA0TdAiZ3_ZEhcAydgoVDQE,2798
|
|
83
|
+
core/bundled/tools/semgrep.lock,sha256=u4bBDf_sJxs1vXy6VF7cG-AejC7tJSxGAMea34CYAbQ,90798
|
|
84
|
+
core/bundled/tools/stylelint.config.json,sha256=eoiPQXBG_HTnuDI_o_3ZO054lvVlFo-DMrcp2PkTHzI,365
|
|
85
|
+
core/catalog/__init__.py,sha256=eeGsPJ2HBrPWd2oo0z1oT6bVN9MyWYcc4NRyYnNPLEE,6325
|
|
86
|
+
core/catalog/build.py,sha256=TzLFTPMvw9vnXIpC4zf3WnCmZmJr1zSrqdYRky1d-kY,3179
|
|
87
|
+
core/catalog/merge.py,sha256=GrC9OnBMl_pyMPeaIr6BtZIsJRrOct4ABhQ-M3no0wk,5069
|
|
88
|
+
core/catalog/sources.py,sha256=fLsS9b78gtwbo44R3KDCJ-iklFtsKNtqMUbA9eoiPH0,19112
|
|
89
|
+
core/catalog/standards.py,sha256=z6Vs-YkmI3hClLWX4-VIEJLRFlTTEF8ui1V-EPjvUWM,5290
|
|
90
|
+
core/catalog/update.py,sha256=v3No5_7H2bnrx3Pesbw-xSgSq8xsJRWEvX8aBrofAZQ,3302
|
|
91
|
+
core/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
|
+
core/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
93
|
+
core/management/commands/addproject.py,sha256=euIQZpuR1fgTrAnlTjyfNoxWWtOxUy2mfYpqC0D20j4,1855
|
|
94
|
+
core/management/commands/buildcatalog.py,sha256=5l_2L3X8FhAsy5OZWHPO5utZqWjujgAFpjR1-IHfzGo,555
|
|
95
|
+
core/management/commands/scan.py,sha256=dSuSe37_vzMRRkR1NIR3EItZ65efyZutphZkllrbyFg,3582
|
|
96
|
+
core/management/commands/updatecatalog.py,sha256=hNVBrQyCrZaEpm4pZlwwGJPXiDDkKabr-O4imj10eys,597
|
|
97
|
+
core/migrations/0001_initial.py,sha256=CRZsDXt5U3rVUs3O_Gkr6bsNxg19_GihL8JFni1vsrQ,6057
|
|
98
|
+
core/migrations/0002_auth_tokens_a11y.py,sha256=nNcxNU9fPq5cA1YmgVqdrQ-7WtVFPgeJcaTX5XaJj00,2857
|
|
99
|
+
core/migrations/0003_default_admin.py,sha256=35DbLP_VVs3FYuNU1Q2u0lqa56mj4NiGk4WWhXm4nuw,1627
|
|
100
|
+
core/migrations/0004_project_members.py,sha256=fgqaiOqsSmxBj0b4JuRpo8KcA88klAWX-gElGwVhgMM,1214
|
|
101
|
+
core/migrations/0005_uploads_and_sources.py,sha256=OBs5kHyzmAtEBs6KBgVQkrTGGwqxbONa1f7lVzEa1ok,2234
|
|
102
|
+
core/migrations/0006_thresholds.py,sha256=ICF-qOOktztDdPP-Tru2yslZ_dEXvVxENtnvWhTPdvQ,956
|
|
103
|
+
core/migrations/0007_also_reported_by.py,sha256=Y0pKiEO-84yQjooL5lFaTyudbvQSjC8mNZGIEO6mGec,394
|
|
104
|
+
core/migrations/0008_new_code_period.py,sha256=b8lJmUxSlGQvezWRMeVLdX_A3cIW8fN8eCM4NBZW5kg,602
|
|
105
|
+
core/migrations/0009_resolution_safe.py,sha256=L1bWBS6IjjTelIQ1eZU7LOsAdw0EQsRUijZThWnSugc,494
|
|
106
|
+
core/migrations/0010_analysis_progress.py,sha256=L-3qKUzZDYUWLUcQnm9Hdfmpv2ZU_Mo1FeY4_xUEWrA,394
|
|
107
|
+
core/migrations/0011_overall_gate_conditions.py,sha256=Adwi6fhtYJlkcLZqhhw67P3jkV41ZuB6BwE9G1NYqiE,1089
|
|
108
|
+
core/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
109
|
+
core/templates/core/account.html,sha256=K3uOvzFGIRDpuxJt3pXAOSjcHVGJ7pZizWAXQmu1RU4,1765
|
|
110
|
+
core/templates/core/analysis.html,sha256=HgcGArPIVevKt0NsKLAROgo-8VECakvclUQMtHznF2w,7604
|
|
111
|
+
core/templates/core/base.html,sha256=ZORgUqNZFDFIBByfoa3fJCS-8vigew5PBZNNqKEZabU,8016
|
|
112
|
+
core/templates/core/form_table.html,sha256=6yV8FXZxYoh6-Ulsd_2Fpj1JtQmzie-1Uz1j6it-lrM,784
|
|
113
|
+
core/templates/core/gate_badge.html,sha256=ERsj14gxkI64H0U8Nmy05mS7DHdQ8293CgAfT8KCDys,501
|
|
114
|
+
core/templates/core/index.html,sha256=EeYrEFP4dhY-zATnzH76BbrQCo5FAApokpPS5dN2vhU,2574
|
|
115
|
+
core/templates/core/issues.html,sha256=PiKWoeoRJPPJL0q6FrvyGYpi5IJSZMfLrAOphtOxOUs,4142
|
|
116
|
+
core/templates/core/login.html,sha256=5Ddd0bZfbTsPL78rg4FdhTYBYGsj2tfDZbt3t-AUTjM,387
|
|
117
|
+
core/templates/core/new_project.html,sha256=Bycol2y84Pd6UL0FDLmWDPs5Qm44Q6QOmFD4tQo6DfU,2241
|
|
118
|
+
core/templates/core/password_change.html,sha256=M5uLppsYo1TwyKWW2ZqrJc5i7HeMOxFHP1hRAhgGkp4,567
|
|
119
|
+
core/templates/core/project.html,sha256=RDI0iHimtyHvsmifKWv1g88GOhU86C77PYeSgwn2VHg,4014
|
|
120
|
+
core/templates/core/rating.html,sha256=AIqE3xLUhGcVP0Thpx_E-gQg9iTXZcWnd8bos7uead0,178
|
|
121
|
+
core/templates/core/ratings.html,sha256=oeUqdVFpLiFgSzWSZaWOI7LY45z8a5abfSuyAHF4QIQ,3523
|
|
122
|
+
core/templates/core/rule.html,sha256=TYMu_qViYxwpxg67mOK1NIS8Z3dL1WjGAJ3oIjZBwBw,3598
|
|
123
|
+
core/templates/core/rules.html,sha256=ivbT84FaxdeuK9PUtdmBTm_68AODlqM7DI6g_KU5sj8,4824
|
|
124
|
+
core/templates/core/scan_progress.html,sha256=Bc09wnp2Talr_jY1K5MswAyserNONAEaI2SFgNUh5rQ,477
|
|
125
|
+
core/templates/core/settings.html,sha256=yv4qaoFVU68hA3DABbxaKh68S6nEU2tTQQ07ug2CZe4,2896
|
|
126
|
+
core/templates/core/source.html,sha256=Y7floBNdAaGUqq5NCQd6vxqMCht1NDtZe4oNEOW1jWg,1356
|
|
127
|
+
core/templates/core/standards.html,sha256=Cp3ar_DXn4Vx9422tDwS72JbPjopInJaDrjZ5fmW3yA,2879
|
|
128
|
+
core/templates/core/user_edit.html,sha256=x89g__HUt2fenaxLs_AX4BwbkhaXszVKLl1eqdocry0,870
|
|
129
|
+
core/templates/core/users.html,sha256=y_VJ2gbwRkjVA4YTES5epmhjcLPJSXt5e_RGqJ1Ccr0,1056
|
|
130
|
+
core/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
131
|
+
core/templatetags/codewatch.py,sha256=IvLzFKEzJINw8vFaQM-1_rMkVn0A5URBiOLO4yCsGtU,812
|
|
132
|
+
codewatch_scan-0.1.0.dist-info/METADATA,sha256=NEa4kkh6ilB6eOdNl7EYHDsCfKB_zm5gT0lj9twVPdQ,3499
|
|
133
|
+
codewatch_scan-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
134
|
+
codewatch_scan-0.1.0.dist-info/entry_points.txt,sha256=__3HwUWernMIzzY_zehsUWXqDTG5_5Sfuf75SGsbsC4,123
|
|
135
|
+
codewatch_scan-0.1.0.dist-info/top_level.txt,sha256=k8NtBg2aioNn86flrDyXQQO63B8AnnelbETXEFX1cto,15
|
|
136
|
+
codewatch_scan-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shwan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
core/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
from .accessibility import Axe, HtmlA11y, JsxA11y
|
|
4
|
+
from .codewatch_checks import CodewatchChecks
|
|
5
|
+
from .coverage import Coverage
|
|
6
|
+
from .dependencies import OsvLockfiles, PipAudit
|
|
7
|
+
from .extra import Checkov, CognitiveComplexity, EslintQuality, Secrets, Stylelint, TypeCheck
|
|
8
|
+
from .multi_tools import Cppcheck, Jscpd, Lizard, Semgrep
|
|
9
|
+
from .python_tools import Bandit, Radon, Ruff
|
|
10
|
+
|
|
11
|
+
# ast.parse() of scanned code reports that code's invalid escapes ("\\d") as SyntaxWarnings from "<unknown>";
|
|
12
|
+
# they're the scanned project's business, not codewatch's.
|
|
13
|
+
warnings.filterwarnings("ignore", category=SyntaxWarning, module="<unknown>")
|
|
14
|
+
|
|
15
|
+
ANALYZERS = [
|
|
16
|
+
Ruff(), Bandit(), Radon(), CognitiveComplexity(), TypeCheck(), Lizard(), EslintQuality(), Stylelint(), Semgrep(),
|
|
17
|
+
Cppcheck(), Jscpd(), CodewatchChecks(), Secrets(), Checkov(), PipAudit(), OsvLockfiles(), HtmlA11y(), JsxA11y(),
|
|
18
|
+
Axe(), Coverage(),
|
|
19
|
+
]
|