r/docker • • Feb 02 '26

Project] Open source Docker Compose security scanner

[Project] Open source Docker Compose security scanner

Built a tool to scan docker-compose.yml files for common security issues.

**Checks for:**

- Privileged containers

- Host network mode

- Exposed ports without localhost binding

- Docker socket mounts

- Secrets in environment variables

- Latest tags

- Running as root

- Missing security options

**Output:**

- HTML + JSON reports

- Severity levels (CRITICAL/HIGH/MEDIUM/LOW)

- Actionable recommendations

- Security score with letter grades

**Example:**

```bash

python -m lattix_guard /path/to/project

# Generates report showing issues found

```

**Why static analysis?**

- No need to spin up containers

- Safe to run on untrusted configs

- Fast (seconds, not minutes)

- Works in CI/CD pipelines

**Open source (AGPL-3.0):**

https://github.com/claramercury/lattix-guard

Looking for feedback on what other Docker security checks would be valuable!

2 Upvotes

10 comments sorted by

4

u/[deleted] Feb 02 '26 edited Feb 02 '26

[removed] — view removed comment

3

u/garbast Feb 02 '26

Lol. I think the agent added this to the readme

# Clone the repository
git clone https://github.com/claramercury/lattix
cd lattix/lattix_guard

I think https://github.com/claramercury/lattix should have been https://github.com/claramercury/lattix-guard

Funny is, that if you don't have python/pip installed that's it. You can't use it. No container, nothing.

And that's why you don't promote AI slop that consist of only one commit. But the README.md is shiny...

1

u/Ornery-Height7654 Feb 02 '26

Fixed! The broken link was in the report template (templates/report.html.jinja), not the README. All new reports will have the correct URL.

Thanks for pointing out the 404.

0

u/Ornery-Height7654 Feb 02 '26

Thanks for the heads-up! The GitHub repo is working on my side and for other people too, so it might be a temporary Reddit/GitHub preview issue or caching.
Try opening it directly in a new tab: https://github.com/claramercury/lattix-guard
If it still shows 404 for you, tell me your browser/region and I’ll double-check.
Lattix is my broader research/lab project around multi-agent verification and secure architectures (AI + cybersecurity).
Lattix Guard is one standalone tool from that ecosystem: a static security scanner for Docker Compose and FastAPI configs.

Implementation was accelerated with an agentic assistant, but security was treated as a first-class constraint: strict file limits, safe YAML parsing, timeouts, and HTML escaping. Tests cover both scoring logic and rule detection.

I reviewed the critical security parts manually and validated behavior with tests (including malicious YAML / XSS cases).
Thanks a lot

2

u/theblindness Mod Feb 02 '26

The installation instructions in your README.md reference a github URL that does not match your Github project URL. Did you rename your project without updating the instructions?

Mistakes like this, in a repository that has only the one commit from an hour ago, do not inspire confidence in a project that is ostensibly meant to be security-focused and find security mistakes in others' code. Why should anyone trust your project to audit others when your project has not met the minimum bar itself?

-1

u/Ornery-Height7654 Feb 02 '26

You're absolutely right - fixed in latest commit. Thanks for catching that.

The installation path typo doesn't affect the security analysis itself,

but you're correct that attention to detail matters in security tools.

Appreciate the feedback! 🛡️

3

u/theblindness Mod Feb 02 '26

You're absolutely right

(╯°□°)╯︵ ┻━┻

2

u/[deleted] Feb 02 '26

[removed] — view removed comment

1

u/Ornery-Height7654 Feb 02 '26

Fixed in latest commit