mirror of
https://github.com/trailofbits/algo.git
synced 2026-08-17 21:25:50 +02:00
* Add comprehensive pre-commit hooks for code quality - Set up pre-commit framework with hooks for Python, YAML, Ansible, and shell - Configure ruff for Python linting and formatting - Add yamllint for YAML validation - Include ansible-lint and syntax checks - Add shellcheck for shell scripts - Create development documentation - Auto-fix trailing whitespace and file endings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove redundant DEVELOPMENT.md and update CONTRIBUTING.md - Removed docs/DEVELOPMENT.md as it was redundant with existing documentation - Added pre-commit hooks setup instruction to CONTRIBUTING.md for contributors - Consolidated development guidance into a single location 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
38 lines
1.0 KiB
Django/Jinja
38 lines
1.0 KiB
Django/Jinja
# Privacy-enhanced kernel log rotation
|
|
# Reduces retention time for kernel logs that may contain VPN traces
|
|
# Generated by Algo VPN privacy role
|
|
|
|
/var/log/kern.log
|
|
{
|
|
# Aggressive rotation for kernel logs
|
|
rotate {{ privacy_log_rotation.rotate_count }}
|
|
maxage {{ privacy_log_rotation.max_age }}
|
|
size {{ privacy_log_rotation.max_size }}M
|
|
|
|
daily
|
|
missingok
|
|
notifempty
|
|
compress
|
|
delaycompress
|
|
|
|
create 0640 syslog adm
|
|
copytruncate
|
|
|
|
# Pre-rotation script to filter VPN-related entries
|
|
prerotate
|
|
# Create filtered version excluding VPN traces
|
|
if [ -f /var/log/kern.log ]; then
|
|
grep -v -E "(wireguard|ipsec|strongswan|xl2tpd)" /var/log/kern.log > /tmp/kern.log.filtered || true
|
|
if [ -s /tmp/kern.log.filtered ]; then
|
|
mv /tmp/kern.log.filtered /var/log/kern.log
|
|
fi
|
|
fi
|
|
endscript
|
|
|
|
postrotate
|
|
if [ -f /var/run/rsyslogd.pid ]; then
|
|
kill -HUP `cat /var/run/rsyslogd.pid`
|
|
fi
|
|
endscript
|
|
}
|