cronlint-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cronlint
Crontab security audit with the byte offsets that prove each finding.
35 rules over three passes — expression, task, file — zero dependencies,
SARIF for CI, MCP server. Reads the 5-field standard, 6-field cronie
(leading seconds), 7-field Quartz (trailing year), @special names,
and the /etc/crontab user column.
中文文档:README_CN.md
uvx --from "git+https://github.com/xuange-hu/cronlint" cronlint demoContents
Related MCP server: civet
Why a cron linter
Crontab entries fail quietly. Four failure modes a shell never warns you about:
A six-field schedule is read three different ways. cronie reads a leading seconds field, Quartz reads a trailing year, and
/etc/crontabreads a user column between the schedule and the command. Get the shape wrong and the command you think you scheduled runs at a different time — or under a different user. cronlint decides the shape per line, tells you which one it chose, and flags the ambiguous ones (CRN002/CRN003).DOM and DOW together are an OR, not an AND.
0 0 1 * monfires on the 1st and every Monday. Almost everyone reads it as "the Monday that is the 1st" (CRN006).The command line is a credential display.
--password=hunter2is visible inpsto every user on the box for the whole run (CRN014).Nothing warns you that two jobs write the same log in the same minute, or that an every-minute job has no lock and stacks copies of itself (CRN050–CRN058).
Pass | Reads | Catches |
1 | one schedule | unparseable fields, seconds/year shapes, unknown |
2 | one task line | relative paths, world-writable dirs, unquoted expansion, command substitution, credentials, |
3 | the whole file | duplicate schedules, same script twice, two jobs in the same minute, shared log files, every-minute jobs without |
Every finding carries file:line, a byte offset, the offending slice, and a fix.
3-step start
pip install "cronlint @ git+https://github.com/xuange-hu/cronlint"
# 1. the built-in broken corpus — proves the tool works in 5 seconds
cronlint demo
# 2. audit every crontab in your repo
cronlint scan .
# 3. gate CI on it
cronlint scan /etc/cron.d --sarif > cronlint.sarif --fail-on highExpected demo output (185 findings, all 35 rules exercised):
=== cron.d ===
cron.d
170 finding(s) critical=3 high=27 medium=112 low=28 note=0 risk=100/100
[critical] CRN014 Credential on the command line
credential is passed as an argument and is visible in the process list
line 10, offset 0x10a+18 (line 10: /opt/backup/nightly.sh --password=hunter2)
saw: --password=hunter2
fix: Read the secret from a root-only file or a keyring; never put it in the command.
[high ] CRN054 Every-minute job with no lock
fires every minute with nothing preventing a second copy
line 9, offset 0xc5+9 (line 9: /tmp/refresh.sh)
saw: * * * * *
fix: Wrap it: `flock -n /run/job.lock /path/to/job`.
corpora: 3, findings: 185
rules fired: 35/35demo ends with rules fired: 35/35 — every rule in
docs/rules.md has a sample line in the corpus that
triggers it, so the demo doubles as the rule regression suite.
Shapes it understands
Line | Shape | How cronlint decides |
| standard | five fields |
| six fields | sixth token not a schedule field → command |
| year | two field-shaped tokens after five |
| special |
|
| user column | path is |
Unsure which shape your six fields are? Say so:
cronlint scan file --assume-seconds # force leading-seconds reading
cronlint scan file --standard # force 5 fields + command
cronlint scan file --assume-user # force the /etc/crontab user columnExit codes gate CI
Code | Meaning |
0 | nothing at or above |
1 | something was |
2 | input could not be read |
cronlint scan . --fail-on critical --json | jq '.findings[].rule_id'MCP server
pip install "cronlint[mcp] @ git+https://github.com/xuange-hu/cronlint"
cronlint-mcpSix tools: cronlint_scan, cronlint_text, cronlint_rules,
cronlint_explain, cronlint_sarif, cronlint_demo. The mcp package is
imported inside build_server() only — the CLI never loads it
(tests/test_packaging.py asserts this statically).
Install from a clone
git clone https://github.com/xuange-hu/cronlint
cd cronlint
pip install -e ".[mcp]" pytest ruff
pytest # 189 tests
ruff check src testsNo install is needed to run the tests after a clone — the root
conftest.py puts src/ on sys.path.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Static MCP server scan: injection, secrets, tool poisoning. SARIF + rules catalog.
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
Audit MCP servers for tool poisoning and shadowing. Scan a remote server by URL or paste its tools.
Audit your MCP servers for poisoned tools and leaked secrets, and check AI-generated code for flaws.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceStatic compliance-controls checker that verifies regulatory required controls exist in code, running deterministic rule packs via MCP tools for compliance checks, rule listing, and explanation.112 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables auditing GitHub Actions workflows for security problems directly from an MCP client, returning a risk score and findings with file:line evidence, attack narratives, and fixes. Also exposes the full rule catalog and a one-call demo that writes and scans a deliberately broken workflow.MIT
- AlicenseNot gradedqualityBmaintenanceEnables scanning paths and pasted snippets for credential leaks, building and diffing baselines, listing rules, assessing entropy, producing SARIF, and running a demo through MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceLets an agent inspect and audit MCP servers before connecting to them, checking their exposed tools, prompts and resources for tool poisoning, shadowing, excessive permissions, leaked secrets and unsafe transports against 24 deterministic rules. Results are returned as findings with evidence, remediation and CWE/OWASP references, and can fail CI with SARIF, Markdown or standalone HTML reports.Apache 2.0