Skip to content

Commit adb135f

Browse files
authored
Merge pull request #7 from stacknil/codex/repo-security-policy
Codex/repo security policy
2 parents 68554bd + 19d5961 commit adb135f

5 files changed

Lines changed: 66 additions & 44 deletions

File tree

AGENTS.md

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,14 @@
11
# AGENTS.md
22

3-
## Project
4-
LogLens is a defensive C++20 CLI for parsing Linux authentication logs and generating structured detection reports.
5-
6-
## Priorities
7-
1. Working MVP first
8-
2. Clean modular C++20
9-
3. Safe public-repo content
10-
4. Reproducible build and tests
11-
5. Clear README and docs
12-
13-
## Constraints
14-
- Do not add offensive or exploitation functionality
15-
- Do not use real IPs, secrets, usernames, or private infrastructure identifiers
16-
- Prefer standard library over third-party dependencies
17-
- Keep file structure simple
18-
- Avoid unnecessary templates or meta-programming
19-
- Avoid heavy regex-only designs if a clearer parser is possible
20-
- Keep detection rules centralized and configurable
21-
22-
## Code style
23-
- C++20
24-
- Readable names
25-
- Small functions
26-
- Comments only where they add real value
27-
- Fail gracefully on malformed log lines
28-
29-
## Repository rules
30-
- Always update README when adding user-visible features
31-
- Add or update tests for parser and detector changes
32-
- Preserve public-safe placeholders like 203.0.113.x and example-host
33-
- Do not introduce large unrelated refactors
34-
35-
## Task behavior
36-
When given a task:
37-
1. inspect repository state
38-
2. explain plan briefly
39-
3. implement in small steps
40-
4. run build/tests if available
41-
5. summarize created/modified files and remaining issues
3+
## LogLens Repo Rules
4+
5+
- Keep the repository defensive and public-safe. Do not add offensive, exploitation, persistence, or live attack functionality.
6+
- Use only safe placeholders such as `203.0.113.x` and `example-host`. Never add real IPs, usernames, secrets, or private identifiers.
7+
- Prefer standard C++20 and the standard library. Keep code modular, readable, and easy to extend.
8+
- Keep detection rules centralized and configurable. Avoid large unrelated refactors.
9+
- Fail gracefully on malformed log lines.
10+
- Update README or docs for user-visible changes.
11+
- Tests are required for code changes. Add or update parser/detector tests and run available build/tests when possible:
12+
`cmake -S . -B build`
13+
`cmake --build build`
14+
`ctest --test-dir build --output-on-failure`

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## v0.1.0
6+
7+
- Added parser support for `syslog_legacy` and `journalctl_short_full` authentication log input.
8+
- Added rule-based detections for SSH brute force, multi-user probing, and bursty sudo activity.
9+
- Added parser coverage telemetry, including parsed/unparsed counts and unknown-pattern buckets.
10+
- Added repository automation and hardening with CI, CodeQL, pinned GitHub Actions, security policy, and Dependabot for workflow updates.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 stacknil
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ C++20 defensive log analysis CLI for Linux authentication logs, with parser cove
77

88
It parses `auth.log` / `secure`-style syslog input and `journalctl --output=short-full`-style input, normalizes authentication evidence, applies configurable rule-based detections, and emits deterministic Markdown and JSON reports.
99

10-
## Why this project exists
10+
## Project Status
11+
12+
LogLens is an MVP / early release. The repository is stable enough for public review, local experimentation, and extension, but the parser and detection coverage are intentionally narrow.
13+
14+
## Why This Project Exists
1115

1216
Many small security tools can detect a handful of known log patterns. Fewer tools make their parsing limits visible.
1317

14-
LogLens is designed around three ideas:
18+
LogLens is built around three ideas:
1519

1620
- detection engineering over offensive functionality
1721
- parser observability over silent failure
1822
- repository discipline over throwaway scripts
1923

20-
The project reports suspicious login activity while also surfacing parser coverage, unknown-line buckets, CI status, and code scanning hygiene.
21-
2224
## Scope
2325

2426
LogLens is a defensive, public-safe repository.
@@ -33,7 +35,7 @@ LogLens includes two minimal GitHub Actions workflows:
3335
- `CI` builds and tests the project on `ubuntu-latest` and `windows-latest`
3436
- `CodeQL` runs GitHub code scanning for C/C++ on pushes, pull requests, and a weekly schedule
3537

36-
Both workflows are intended to stay stable enough to require on pull requests to `main`. The repository hardening note is in [`docs/repo-hardening.md`](./docs/repo-hardening.md).
38+
Both workflows are intended to stay stable enough to require on pull requests to `main`. The repository hardening note is in [`docs/repo-hardening.md`](./docs/repo-hardening.md), and vulnerability reporting guidance is in [`SECURITY.md`](./SECURITY.md).
3739

3840
## Threat Model
3941

docs/release-v0.1.0.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# LogLens v0.1.0
2+
3+
LogLens v0.1.0 is the first public MVP release of the repository.
4+
5+
## Highlights
6+
7+
- Parses Linux authentication logs in both `syslog_legacy` and `journalctl_short_full` modes.
8+
- Normalizes authentication evidence and applies configurable detections for SSH brute force, multi-user probing, and sudo burst activity.
9+
- Reports parser coverage telemetry so unsupported lines are visible instead of silently ignored.
10+
- Ships with deterministic Markdown and JSON reports, unit tests, CI, CodeQL, and baseline repository hardening.
11+
12+
## Notes
13+
14+
- This release is intentionally narrow in scope and focused on a clean, public-safe baseline.
15+
- Parser coverage is limited to a small set of common `sshd`, `sudo`, and `pam_unix` patterns.
16+
- Repository protections are designed for PR-based development with CI and CodeQL gating merges into `main`.

0 commit comments

Comments
 (0)