You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libssl3t64 3.5.4-1~deb13u2 3.5.6-1~deb13u2 deb CVE-2026-34181 High < 0.1% (0th) < 0.1
142
+
openssl 3.5.4-1~deb13u2 3.5.6-1~deb13u2 deb CVE-2026-34181 High < 0.1% (0th) < 0.1
143
+
openssl-provider-legacy 3.5.4-1~deb13u2 3.5.6-1~deb13u2 deb CVE-2026-34181 High < 0.1% (0th) < 0.1
144
+
145
+
```
146
+
147
+
### Analysis
148
+
149
+
The scan results suggested that many vulnerabilities originated from components inherited from the base image rather than the application code itself.
150
+
151
+
To validate this assumption, the base image was upgraded from Python 3.11 Slim to Python 3.13 Slim and the image was rebuilt.
152
+
153
+
After rebuilding and rescanning, the number of fixable High and Critical vulnerabilities dropped significantly, confirming that the base image version was a major contributor to the overall vulnerability count.
154
+
155
+
---
156
+
157
+
## Remediation
158
+
159
+
The application image was originally built using:
160
+
161
+
```dockerfile
162
+
FROM python:3.11-slim
163
+
```
164
+
165
+
To reduce exposure to known vulnerabilities, the base image was upgraded to (latest stable version at the time of this update: 15-06-2026):
166
+
167
+
```dockerfile
168
+
FROM python:3.13-slim
169
+
```
170
+
171
+
The image was rebuilt, pushed to dockerhub and published as:
172
+
173
+
```text
174
+
janemils/janemils-app:fastapi-v4
175
+
```
176
+
177
+
The Kubernetes deployment manifests and Terraform configuration were updated to reference the remediated image version.
178
+
179
+
Changes were then committed and deployed through the existing GitOps workflow.
180
+
181
+
---
182
+
183
+
## Validation Scan Results (fastapi-v4)
184
+
185
+
The updated image was rescanned using Grype:
186
+
187
+
```bash
188
+
# Let's identify the critical and the high vulnerabilities of the 'janemils/janemils-app:fastapi-v4' image using grype.
189
+
root@ubuntu-host Devops-Project-1 on main [!?] ➜ grype janemils/janemils-app:fastapi-v4 --only-fixed | grep -E "High|Critical"
The updated image significantly reduced the number of fixable vulnerabilities compared to the previous version.
206
+
207
+
```
208
+
# With the v3 version:
209
+
24 fixed vulnerabilities
210
+
6 Critical
211
+
23 High
212
+
```
213
+
214
+
```
215
+
# With the v4 version:
216
+
9 fixed vulnerabilities
217
+
1 Critical
218
+
0 High
219
+
```
220
+
221
+
This demonstrates a common remediation strategy used in production environments where updating base images and dependencies can improve security posture without requiring application code changes.
222
+
223
+
---
224
+
225
+
## Remaining Findings
226
+
227
+
A small number of vulnerabilities remained after remediation.
228
+
229
+
One notable finding affected the Python runtime itself, where the recommended fix was only available in a beta Python release.
230
+
231
+
Since beta runtimes are generally not considered production-ready, the finding was documented and accepted temporarily rather than introducing an unstable runtime into the application.
232
+
233
+
This reflects a common real-world security trade-off where risk must be balanced against operational stability.
234
+
235
+
---
236
+
237
+
## Key Takeaways
238
+
239
+
* Vulnerability scanning should be performed regularly.
240
+
* Container images inherit vulnerabilities from their base images.
241
+
* Many vulnerabilities can be remediated through dependency and runtime upgrades.
242
+
* Not every vulnerability has an immediate production-ready fix.
243
+
* Security findings should be analyzed before remediation decisions are made.
244
+
* Vulnerability scanning is most effective when integrated into CI/CD pipelines.
245
+
246
+
---
247
+
248
+
## Next Steps
249
+
250
+
Now that you have an understanding of how grype works and have tested it out locally, the next phase of this project will integrate Grype into the GitHub Actions workflow to automate vulnerability scanning during the CI process and prevent vulnerable images from progressing further through the delivery pipeline.
0 commit comments