-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathclose-issues.sh
More file actions
executable file
Β·280 lines (210 loc) Β· 10.2 KB
/
close-issues.sh
File metadata and controls
executable file
Β·280 lines (210 loc) Β· 10.2 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#!/bin/bash
#
# Script to close all DockerScan v1.x issues now that v2.0 (Go) has been released
#
# Usage:
# export GITHUB_TOKEN="your_github_token"
# ./close-issues.sh
#
# Or:
# GITHUB_TOKEN="your_token" ./close-issues.sh
#
set -e
REPO="cr0hn/dockerscan"
API_URL="https://api.github.com"
# Check for GitHub token
if [ -z "$GITHUB_TOKEN" ]; then
echo "β Error: GITHUB_TOKEN environment variable is required"
echo ""
echo "Get a token from: https://github.com/settings/tokens"
echo "Required scope: repo (full control of private repositories)"
echo ""
echo "Usage:"
echo " export GITHUB_TOKEN='your_token_here'"
echo " ./close-issues.sh"
exit 1
fi
echo "π Closing DockerScan v1.x issues..."
echo ""
# Function to close an issue with a comment
close_issue() {
local issue_number=$1
local comment=$2
local reason=${3:-"completed"} # completed or not_planned
echo "π Closing issue #$issue_number..."
# Add comment
curl -s -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"$API_URL/repos/$REPO/issues/$issue_number/comments" \
-d "{\"body\": $(echo "$comment" | jq -Rs .)}" > /dev/null
# Close issue
curl -s -X PATCH \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"$API_URL/repos/$REPO/issues/$issue_number" \
-d "{\"state\": \"closed\", \"state_reason\": \"$reason\"}" > /dev/null
echo "β
Issue #$issue_number closed"
echo ""
}
# Close Issue #18: Error in Fetching Python-dxf
close_issue 18 "This issue has been resolved in **DockerScan v2.0** π
DockerScan has been **completely rewritten from scratch in Go**, eliminating all Python dependencies including python-dxf. The new version:
β
**No Python dependencies** - Single binary distribution
β
**10x faster performance** - Native Go implementation
β
**Modern security features** - CIS Benchmark, Supply Chain Detection, Advanced Secrets Scanning
**To get started with v2.0:**
\`\`\`bash
# Download the latest release
curl -L https://github.com/cr0hn/dockerscan/releases/latest/download/dockerscan-linux-amd64 -o dockerscan
chmod +x dockerscan
sudo mv dockerscan /usr/local/bin/
# Run
dockerscan nginx:latest
\`\`\`
**Migration:** The Python version (v1.x) is no longer maintained. Please upgrade to v2.0.
π [Documentation](https://github.com/cr0hn/dockerscan/blob/main/README.md)
π For v2.0 issues, please [open a new issue](https://github.com/cr0hn/dockerscan/issues/new)
Closing this as the Python codebase has been completely replaced." "completed"
# Close Issue #17: 'NoneType' object has no attribute 'append'
close_issue 17 "This issue is no longer applicable as **DockerScan v2.0** has been completely rewritten in Go.
The Python version (v1.x) with the trojanize feature has been **deprecated and removed**.
**DockerScan v2.0 focuses on security scanning:**
- β
CIS Docker Benchmark v1.7.0 (80+ checks)
- β
Supply chain attack detection
- β
Advanced secrets detection (40+ patterns)
- β
CVE scanning (2024-2025)
- β
Runtime security analysis
**Note:** Trojanizing features are intentionally excluded from v2.0 as the tool now focuses on defensive security and compliance rather than offensive capabilities.
π [Read the v2.0 Documentation](https://github.com/cr0hn/dockerscan/blob/main/README.md)
Closing as the Python codebase no longer exists." "completed"
# Close Issue #13: NameError: name 'Integer' is not defined
close_issue 13 "This Python dependency issue has been resolved by **migrating to Go** in v2.0.
DockerScan v2.0 is a **complete rewrite** that eliminates all problematic Python dependencies:
**What's New:**
- π Written in **Go 1.22+** - No more dependency conflicts
- π¦ **Single binary** - No pip, no virtualenv, no booby library
- β‘ **10x faster** - Native performance
- π **Modern security scanners** - Based on 2024-2025 research
**Get v2.0:**
\`\`\`bash
# Download from releases
curl -L https://github.com/cr0hn/dockerscan/releases/latest/download/dockerscan-linux-amd64 -o dockerscan
chmod +x dockerscan
./dockerscan nginx:latest
\`\`\`
The Python version is no longer maintained. Please upgrade to v2.0.
Closing as this issue doesn't apply to the new Go implementation." "completed"
# Close Issue #12: dockerscan image info failed
close_issue 12 "This issue has been resolved in **DockerScan v2.0** which includes a **complete rewrite** of image parsing logic.
The new Go implementation uses **official Docker client libraries** for robust image inspection:
**New in v2.0:**
- β
Proper Docker image format handling
- β
Native Docker API integration
- β
Support for all modern image formats
- β
Better error messages and diagnostics
**Example usage:**
\`\`\`bash
dockerscan nginx:latest
\`\`\`
The tool now properly handles image analysis without the 'repositories' file errors.
π [See Documentation](https://github.com/cr0hn/dockerscan/blob/main/README.md)
Closing as the Python version is deprecated and v2.0 resolves this." "completed"
# Close Issue #11: Fail on startup not being absolute
close_issue 11 "This path handling issue is resolved in **DockerScan v2.0**.
The Python version (v1.x) that contained this bug has been **completely replaced** with a Go implementation.
**DockerScan v2.0:**
- β
Single binary execution (no startup scripts)
- β
Proper path handling
- β
Cross-platform support (Linux, macOS, Windows, FreeBSD)
The new version doesn't use startup files in the same way, making this issue obsolete.
π₯ [Download v2.0](https://github.com/cr0hn/dockerscan/releases/latest)
Closing as the Python codebase no longer exists." "completed"
# Close Issue #9: pip install dockerscan yields an error
close_issue 9 "This pip installation issue is resolved in **DockerScan v2.0** π
**No more pip!** DockerScan v2.0 is distributed as a **pre-compiled binary** - just download and run.
**Installation (v2.0):**
**Linux / macOS:**
\`\`\`bash
curl -L https://github.com/cr0hn/dockerscan/releases/latest/download/dockerscan-linux-amd64 -o dockerscan
chmod +x dockerscan
sudo mv dockerscan /usr/local/bin/
\`\`\`
**Windows (PowerShell):**
\`\`\`powershell
Invoke-WebRequest -Uri \"https://github.com/cr0hn/dockerscan/releases/latest/download/dockerscan-windows-amd64.exe\" -OutFile \"dockerscan.exe\"
\`\`\`
**Features:**
- β
No Python required
- β
No dependencies to install
- β
Single binary (5-10 MB)
- β
Works on 9 platforms
The Python version is no longer maintained.
Closing as pip installation is no longer needed." "completed"
# Close Issue #8: [SCAN] Add support for Swarm detection
close_issue 8 "Thank you for this feature request!
**DockerScan v2.0** has been released with a **focused mission: security scanning and compliance**.
The new version focuses on:
- β
CIS Docker Benchmark compliance
- β
Supply chain attack detection
- β
Secrets and vulnerability scanning
- β
Runtime security analysis
**Swarm detection** is currently **out of scope** for v2.0 as the tool prioritizes:
1. **Security scanning** over orchestration detection
2. **Container-level** security over cluster management
3. **Defensive security** features
**Future consideration:**
- This feature may be revisited in a future release
- If there's significant demand, please create a new feature request for v2.0
- Contributions are welcome via pull requests
**Current workaround:**
You can detect Swarm mode using standard Docker commands:
\`\`\`bash
docker info | grep \"Swarm: active\"
\`\`\`
Closing as out of scope for v2.0. Feel free to open a new feature request with compelling security use cases." "not_planned"
# Close Issue #7: Support for Open Docker socket in scanner
close_issue 7 "Thank you for this feature request!
**DockerScan v2.0** is now available with a **security-first approach**.
**Current status:**
- The v2.0 scanner focuses on **image and container security analysis**
- Network-based Docker socket detection is **not currently implemented**
**Why not included (yet):**
- v2.0 prioritizes static analysis (images) over network scanning
- Remote socket detection requires different security considerations
- Focus on CIS compliance and vulnerability detection first
**Possible future implementation:**
This could be a valuable addition for detecting exposed Docker APIs. If you'd like to see this in v2.0:
1. **Open a new feature request** with:
- Use cases for security scanning
- How it improves security posture
- Expected behavior and output
2. **Contribute:** We welcome PRs! The new Go codebase is extensible.
**Current workaround:**
Use nmap or similar tools:
\`\`\`bash
nmap -p 2375,2376 -sV <target>
\`\`\`
Closing as out of scope for initial v2.0 release. May reconsider based on community feedback." "not_planned"
# Close PR #10: fixing pip install with proper io handling
echo "π Closing PR #10..."
curl -s -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"$API_URL/repos/$REPO/issues/10/comments" \
-d "{\"body\": \"Thank you for this contribution! π\n\nHowever, this PR is **no longer needed** as DockerScan has been **completely rewritten in Go (v2.0)**.\n\n**Changes:**\n- β Python version (v1.x) has been removed\n- β
Go version (v2.0) doesn't use pip\n- β
Distributed as pre-compiled binaries\n\nThe issue this PR was addressing (#9) has been closed as DockerScan v2.0 no longer requires Python or pip installation.\n\n**Get v2.0:**\nπ₯ [Download from Releases](https://github.com/cr0hn/dockerscan/releases/latest)\nπ [Documentation](https://github.com/cr0hn/dockerscan/blob/main/README.md)\n\nClosing this PR as the codebase it targets no longer exists. Thank you for your effort!\n\nIf you're interested in contributing to v2.0, we welcome Go contributions! π\"}" > /dev/null
curl -s -X PATCH \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"$API_URL/repos/$REPO/pulls/10" \
-d "{\"state\": \"closed\"}" > /dev/null
echo "β
PR #10 closed"
echo ""
echo "π All issues and PRs have been closed successfully!"
echo ""
echo "Summary:"
echo " - Closed 6 bug issues (Python v1.x)"
echo " - Closed 2 feature requests (out of scope)"
echo " - Closed 1 pull request (no longer needed)"
echo ""
echo "β
Total: 9 closed"