-
-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
165 lines (143 loc) · 6.02 KB
/
.pre-commit-config.yaml
File metadata and controls
165 lines (143 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
repos:
# Python Ruff Checks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.1
hooks:
# Beginner projects
- id: ruff
name: ruff check (caesar-cipher)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/caesar-cipher/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (keylogger)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/keylogger/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (dns-lookup)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/dns-lookup/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (metadata-scrubber-tool)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/metadata-scrubber-tool/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (network-traffic-analyzer)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/network-traffic-analyzer/python/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (base64-tool)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/base64-tool/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (c2-beacon backend)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/beginner/c2-beacon/backend/
exclude: (\.venv|__pycache__|\.pytest_cache)/
# Intermediate projects
- id: ruff
name: ruff check (api-security-scanner backend)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/intermediate/api-security-scanner/backend/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (siem-dashboard backend)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/intermediate/siem-dashboard/backend/
exclude: (\.venv|__pycache__|\.pytest_cache)/
# Advanced projects
- id: ruff
name: ruff check (bug-bounty-platform backend)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/advanced/bug-bounty-platform/backend/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (encrypted-p2p-chat backend)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/advanced/encrypted-p2p-chat/backend/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (api-rate-limiter)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/advanced/api-rate-limiter/
exclude: (\.venv|__pycache__|\.pytest_cache)/
- id: ruff
name: ruff check (ai-threat-detection backend)
args: [--fix, --exit-non-zero-on-fix]
files: ^PROJECTS/advanced/ai-threat-detection/backend/
exclude: (\.venv|__pycache__|\.pytest_cache)/
# Go golangci-lint Checks
- repo: local
hooks:
- id: golangci-lint-simple-vulnerability-scanner
name: golangci-lint (simple-vulnerability-scanner)
entry: bash -c 'cd PROJECTS/beginner/simple-vulnerability-scanner && golangci-lint run --fix'
language: system
files: ^PROJECTS/beginner/simple-vulnerability-scanner/
types: [go]
pass_filenames: false
- id: golangci-lint-docker-security-audit
name: golangci-lint (docker-security-audit)
entry: bash -c 'cd PROJECTS/intermediate/docker-security-audit && golangci-lint run --fix'
language: system
files: ^PROJECTS/intermediate/docker-security-audit/
types: [go]
pass_filenames: false
- id: golangci-lint-secrets-scanner
name: golangci-lint (secrets-scanner)
entry: bash -c 'cd PROJECTS/intermediate/secrets-scanner && golangci-lint run --fix'
language: system
files: ^PROJECTS/intermediate/secrets-scanner/
types: [go]
pass_filenames: false
# Biome Frontend Checks
- repo: local
hooks:
- id: biome-bug-bounty-platform
name: biome check (bug-bounty-platform frontend)
entry: bash -c 'cd PROJECTS/advanced/bug-bounty-platform/frontend && npx @biomejs/biome check .'
language: system
files: ^PROJECTS/advanced/bug-bounty-platform/frontend/src/
pass_filenames: false
- id: biome-c2-beacon
name: biome check (c2-beacon frontend)
entry: bash -c 'cd PROJECTS/beginner/c2-beacon/frontend && npx @biomejs/biome check .'
language: system
files: ^PROJECTS/beginner/c2-beacon/frontend/src/
pass_filenames: false
- id: biome-api-security-scanner
name: biome check (api-security-scanner frontend)
entry: bash -c 'cd PROJECTS/intermediate/api-security-scanner/frontend && npx @biomejs/biome check .'
language: system
files: ^PROJECTS/intermediate/api-security-scanner/frontend/src/
pass_filenames: false
- id: biome-siem-dashboard
name: biome check (siem-dashboard frontend)
entry: bash -c 'cd PROJECTS/intermediate/siem-dashboard/frontend && npx @biomejs/biome check .'
language: system
files: ^PROJECTS/intermediate/siem-dashboard/frontend/src/
pass_filenames: false
- id: biome-encrypted-p2p-chat
name: biome check (encrypted-p2p-chat frontend)
entry: bash -c 'cd PROJECTS/advanced/encrypted-p2p-chat/frontend && npx @biomejs/biome check .'
language: system
files: ^PROJECTS/advanced/encrypted-p2p-chat/frontend/src/
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: check-ast
- id: check-symlinks
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-illegal-windows-names
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable