https://github.com/git-stunts/docker-guard
Minimal guard that enforces Git Stunts tests/benchmarks Docker-only policy. Complete with banner, env detection, and test-friendly hooks.
https://github.com/git-stunts/docker-guard
dev-tools docker git git-stunts nodejs npm-package safety security testing
Last synced: about 2 months ago
JSON representation
Minimal guard that enforces Git Stunts tests/benchmarks Docker-only policy. Complete with banner, env detection, and test-friendly hooks.
- Host: GitHub
- URL: https://github.com/git-stunts/docker-guard
- Owner: git-stunts
- License: apache-2.0
- Created: 2026-01-08T17:06:51.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-01-08T18:32:42.000Z (2 months ago)
- Last Synced: 2026-01-12T22:34:44.523Z (2 months ago)
- Topics: dev-tools, docker, git, git-stunts, nodejs, npm-package, safety, security, testing
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @git-stunts/docker-guard
[](https://www.npmjs.com/package/@git-stunts/docker-guard)
[](https://github.com/git-stunts/plumbing/actions/workflows/ci.yml)
[](LICENSE)
Tiny guard that ensures tests and benchmarks only execute inside Docker. Each git-stunts package can import the guard, then call `ensureDocker()` before any runtime work begins.
## Usage
```javascript
import { ensureDocker } from '@git-stunts/docker-guard';
ensureDocker();
```
You can also pass overrides for testing:
```javascript
import { ensureDocker } from '@git-stunts/docker-guard';
ensureDocker({
env: { GIT_STUNTS_DOCKER: '1' },
logger: () => {},
exit: () => {}
});
```
