Skip to content

Universal SEO skill for Claude Code. 26 sub-skills + 19 sub-agents covering technical SEO, E-E-A-T, schema, GEO/AEO, agent readiness (Lighthouse Agentic Browsing, WebMCP, llms.txt), backlinks, local SEO, e-commerce, international SEO, Google APIs, and PDF/Excel reporting. 9 optional extensions for live SEO data.

fix(security): reject a trailing newline in --release

connabyssd94c209e6626
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 648be42..53c56b3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Fixed
+
+- `commoncrawl_graph.py --release` now rejects a value with a trailing newline.
+ The check used `$`, which also matches before a final `\n`, so `x\n` passed
+ and could make the cache key and the download URL disagree.
+
## [2.5.0] - 2026-10-22
Security and accuracy fixes from a full audit, and Claude Desktop installs again.
diff --git a/scripts/commoncrawl_graph.py b/scripts/commoncrawl_graph.py
index 14ec40c..7ace62a 100644
--- a/scripts/commoncrawl_graph.py
+++ b/scripts/commoncrawl_graph.py
@@ -98,7 +98,8 @@ _CACHE_COMPONENT_RE = re.compile(r"[^A-Za-z0-9._-]")
# A Common Crawl release id, e.g. cc-main-2026-jan-feb-mar. Anchored, and no
# '..' anywhere, because this value lands in a filesystem path and a URL path.
-_RELEASE_RE = re.compile(r"^(?!.*\.\.)[A-Za-z0-9._-]+$")
+# \Z, not $: $ also matches before a trailing newline.
+_RELEASE_RE = re.compile(r"^(?!.*\.\.)[A-Za-z0-9._-]+\Z")
def _safe_cache_component(value: str) -> str:
diff --git a/tests/test_commoncrawl_graph.py b/tests/test_commoncrawl_graph.py
index 7c04661..d8221da 100644
--- a/tests/test_commoncrawl_graph.py
+++ b/tests/test_commoncrawl_graph.py
@@ -82,7 +82,7 @@ def test_release_pattern_accepts_real_release_ids(release):
@pytest.mark.parametrize(
"release",
- ["../../../../tmp/pwned", "..", "a/../b", "a..b", "with space", "", "a/b", "x\ty"],
+ ["../../../../tmp/pwned", "..", "a/../b", "a..b", "with space", "", "a/b", "x\ty", "x\n"],
)
def test_release_pattern_rejects_traversal_and_junk(release):
assert not ccg._RELEASE_RE.match(release)