{"id":44988023,"url":"https://github.com/sheldonhull/preflight","last_synced_at":"2026-02-18T20:27:21.148Z","repository":{"id":325557767,"uuid":"1101638098","full_name":"sheldonhull/preflight","owner":"sheldonhull","description":"Lefthook hooks meant to make my life easier by reducing the copya pasta","archived":false,"fork":false,"pushed_at":"2026-01-20T23:49:41.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-21T05:25:45.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sheldonhull.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-22T01:11:48.000Z","updated_at":"2026-01-20T20:01:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sheldonhull/preflight","commit_stats":null,"previous_names":["sheldonhull/preflight"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sheldonhull/preflight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fpreflight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fpreflight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fpreflight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fpreflight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheldonhull","download_url":"https://codeload.github.com/sheldonhull/preflight/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheldonhull%2Fpreflight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29594256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-18T20:27:20.028Z","updated_at":"2026-02-18T20:27:21.137Z","avatar_url":"https://github.com/sheldonhull.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# preflight\n\nReusable Prek hooks and configurations to reduce copy-pasta across projects.\n\nPrek is a Rust-based tool that improves the pre-commit experience with fast execution, TTY detection for VS Code compatibility, and automatic staging of fixed files.\n\n## Remote Hook Configs\n\nThis repository provides **remote prek configurations** that can be shared across multiple repositories without duplicating configuration files.\n\n### Available Configurations\n\n#### Markdown Linting with Docker\n\nDocker-based markdown linting with `markdownlint-cli2` and the `sentences-per-line` plugin.\n\n**Features:**\n\n- Containerized linting (consistent across all environments)\n- Auto-fixes markdown on commit\n- Validates markdown on push\n- Better Git diffs with sentences-per-line rule\n- Auto-stages fixed files (no extra manual step)\n- VS Code compatible (TTY detection, stderr suppression)\n\n**Quick Start:**\n\nAdd this to your repository's `prek.toml`:\n\n```toml\n[settings]\ncolors = \"auto\"\nverbose = false\n\n[settings.tty]\ndetect = true\nsuppress_stderr_when_no_tty = true\nquiet_when_no_tty = true\n\n[remotes.markdown]\nurl = \"https://github.com/sheldonhull/preflight\"\nref = \"main\"\nconfig = \"prek-markdown.toml\"\n```\n\nThen run:\n\n```bash\nprek install\n```\n\nDone! Your repository now has automatic markdown linting.\n\n**Documentation:**\n\n- [Full Documentation](./MARKDOWN_LINTING.md) - Complete setup and usage guide\n- [Quick Reference](./REMOTE_CONFIG_USAGE.md) - TL;DR for consumers\n- [Example Configuration](./examples/remote-markdown-linting/) - Sample setup\n\n#### Security Scanning with Docker\n\nDocker-based security scanning with Checkov, Trivy, and Trufflehog.\n\n**Features:**\n\n- Infrastructure as Code security scanning (Checkov)\n- Vulnerability and misconfiguration scanning (Trivy)\n- Secrets detection (Trufflehog)\n- All tools containerized\n- VS Code compatible\n\n**Quick Start:**\n\nAdd this to your repository's `prek.toml`:\n\n```toml\n[settings]\ncolors = \"auto\"\nverbose = false\n\n[settings.tty]\ndetect = true\nsuppress_stderr_when_no_tty = true\nquiet_when_no_tty = true\n\n[remotes.security]\nurl = \"https://github.com/sheldonhull/preflight\"\nref = \"main\"\nconfig = \"prek-security.toml\"\n```\n\nThen run:\n\n```bash\nprek install\n```\n\n**Documentation:**\n\n- [Full Documentation](./SECURITY_SCANNING.md) - Complete setup and usage guide\n- [Quick Start](./SECURITY_SCANNING_QUICKSTART.md) - Get started in 3 steps\n- [Example Configuration](./examples/remote-security-scanning/) - Sample setup\n\n## What's Inside\n\n- **Docker-based markdown linting** - Consistent linting across all repos\n- **Docker-based security scanning** - Checkov, Trivy, and Trufflehog\n- **Remote configurations** - Share hooks without config duplication\n- **TTY detection** - VS Code compatibility with stderr suppression\n- **Auto-staging** - Fixed files are automatically staged\n- **Automated testing** - Verify your setup works\n- **CI/CD workflows** - Build and publish Docker images\n- **Fast Python installs** - Uses `uv` for package management\n\n## For Maintainers\n\n### Building the Docker Images\n\n```bash\n# Build markdown linting image\n./build-markdownlint-image.sh\n\n# Build security scanner images\n./build-security-images.sh\n```\n\n### Running Tests\n\n```bash\n# Test markdown linting\n./test-markdown-linting.sh\n\n# Test security scanning\n./test-security-scanning.sh\n```\n\n### Publishing to GHCR\n\nThe Docker images are automatically built and published via GitHub Actions on release.\n\n## VS Code Compatibility\n\nThis configuration includes special handling for VS Code's Git integration:\n\n- **TTY Detection**: Detects when running in non-interactive mode\n- **Stderr Suppression**: Suppresses stderr output that causes VS Code to fail commits\n- **Auto-staging**: Fixed files are automatically staged so commits work without extra steps\n- **Skip Environment Variable**: Set `PREK_SKIP=1` to bypass all hooks\n\n## Learn More\n\n- [Prek Documentation](https://github.com/prek-dev/prek)\n- [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2)\n- [Checkov](https://www.checkov.io/)\n- [Trivy](https://aquasecurity.github.io/trivy/)\n- [Trufflehog](https://github.com/trufflesecurity/trufflehog)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheldonhull%2Fpreflight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheldonhull%2Fpreflight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheldonhull%2Fpreflight/lists"}