AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
Python ai-promptsai-skillblueskyclaudeclaude-codeclawhubdeep-researchhackernewsinstagramopenclawpolymarketrecencyredditresearchsocial-mediatiktoktrendstwitterweb-searchyoutube
fix: auto-tighten .env permissions to 0o600 instead of warning only
23241a6749d39d25f8d64b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 0604999e..44575c84 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -19,6 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- The X FROM lane (the subject's own timeline) now pulls up to 8 posts per handle (was 3); the about/related lanes stay modest.+### Fixed++- Secrets `.env` and its parent config directory are now auto-tightened to `0o600`/`0o700` after creation, and `check-config.sh`'s `check_perms` now auto-fixes loose permissions with `chmod 600` instead of warning only ([#573](https://github.com/mvanhorn/last30days-skill/issues/573))+## [3.5.0] - 2026-06-18### Addeddiff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.mdindex 727608e0..757c25ea 100644--- a/CONTRIBUTORS.md+++ b/CONTRIBUTORS.md@@ -54,7 +54,7 @@ v3 has durable watchlist with multi-source storage and extended time windows.## Past Contributors-- [@23241a6749](https://github.com/23241a6749) - Windows cp1252 fixes ([#549](https://github.com/mvanhorn/last30days-skill/pull/549)); Windows killpg guard ([#552](https://github.com/mvanhorn/last30days-skill/pull/552)); browser promo clarity ([#387](https://github.com/mvanhorn/last30days-skill/pull/561)); setup wizard fix ([#574](https://github.com/mvanhorn/last30days-skill/pull/578)); check-config xargs fix ([#506](https://github.com/mvanhorn/last30days-skill/issues/506)); check-config clean-exit on missing last-run ([#463](https://github.com/mvanhorn/last30days-skill/issues/463)); Firefox multi-profile cookies ([#498](https://github.com/mvanhorn/last30days-skill/issues/498)); X/Twitter CT0 template ([#396](https://github.com/mvanhorn/last30days-skill/issues/396))+- [@23241a6749](https://github.com/23241a6749) - Windows cp1252 fixes ([#549](https://github.com/mvanhorn/last30days-skill/pull/549)); Windows killpg guard ([#552](https://github.com/mvanhorn/last30days-skill/pull/552)); browser promo clarity ([#387](https://github.com/mvanhorn/last30days-skill/pull/561)); setup wizard fix ([#574](https://github.com/mvanhorn/last30days-skill/pull/578)); check-config xargs fix ([#506](https://github.com/mvanhorn/last30days-skill/issues/506)); check-config clean-exit on missing last-run ([#463](https://github.com/mvanhorn/last30days-skill/issues/463)); Firefox multi-profile cookies ([#498](https://github.com/mvanhorn/last30days-skill/issues/498)); X/Twitter CT0 template ([#396](https://github.com/mvanhorn/last30days-skill/issues/396)); .env permission auto-fix ([#573](https://github.com/mvanhorn/last30days-skill/pull/599))- [@JosephOIbrahim](https://github.com/JosephOIbrahim) - Windows Unicode fix ([#17](https://github.com/mvanhorn/last30days-skill/pull/17))- [@levineam](https://github.com/levineam) - Model fallback for unverified orgs ([#16](https://github.com/mvanhorn/last30days-skill/pull/16))- [@jonthebeef](https://github.com/jonthebeef) - Early testing and feedbackdiff --git a/hooks/scripts/check-config.sh b/hooks/scripts/check-config.shindex 8a07d7a8..7452bc9f 100755--- a/hooks/scripts/check-config.sh+++ b/hooks/scripts/check-config.sh@@ -28,8 +28,9 @@ check_perms() {# every Linux session start and printed a false WARNING.perms=$(stat -c '%a' "$file" 2>/dev/null || stat -f '%Lp' "$file" 2>/dev/null || echo "")if [[ -n "$perms" && "$perms" != "600" && "$perms" != "400" ]]; then+ chmod 600 "$file" 2>/dev/null || trueecho "/last30days: WARNING — $file has permissions $perms (should be 600)."- echo " Fix: chmod 600 $file"+ echo " Auto-fixed with: chmod 600 $file"fi}diff --git a/tests/test_last_run_state.py b/tests/test_last_run_state.pyindex 986bb8c8..505dbd9b 100644--- a/tests/test_last_run_state.py+++ b/tests/test_last_run_state.py@@ -2,6 +2,8 @@ import ioimport jsonimport osimport re+import shutil+import statimport subprocessimport sysimport shutil@@ -267,5 +269,34 @@ class TestSkillMdFirstRunReference(unittest.TestCase):mock_write.assert_called_once()+class TestCheckPermsAutoFix(unittest.TestCase):+ """check_perms should auto-fix loose .env permissions instead of warning only."""++ def test_loose_env_is_tightened_by_check_perms(self):+ with tempfile.TemporaryDirectory() as tmp:+ config_dir = Path(tmp) / ".config" / "last30days"+ config_dir.mkdir(parents=True)+ env_file = config_dir / ".env"+ env_file.write_text("SETUP_COMPLETE=true\n")+ os.chmod(env_file, 0o644)++ env = os.environ.copy()+ env["HOME"] = str(Path(tmp))+ env["LAST30DAYS_CONFIG_DIR"] = str(config_dir)++ result = subprocess.run(+ ["bash", "hooks/scripts/check-config.sh"],+ cwd=REPO_ROOT,+ env=env,+ capture_output=True,+ text=True,+ check=False,+ )++ self.assertEqual(result.returncode, 0, result.stderr)+ self.assertIn("Auto-fixed", result.stdout)+ self.assertEqual(stat.S_IMODE(os.stat(env_file).st_mode), 0o600)++if __name__ == "__main__":unittest.main()