Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c45f8b4
Harden production readiness
CoreyLeath-code Jul 17, 2026
79ba85a
Harden production readiness
CoreyLeath-code Jul 17, 2026
b840d3d
Harden production readiness
CoreyLeath-code Jul 17, 2026
65d29e1
Harden production readiness
CoreyLeath-code Jul 17, 2026
a3ffba9
Harden production readiness
CoreyLeath-code Jul 17, 2026
646d7dd
Harden production readiness
CoreyLeath-code Jul 17, 2026
750bbab
Harden production readiness
CoreyLeath-code Jul 17, 2026
5aedc75
Harden production readiness
CoreyLeath-code Jul 17, 2026
b1ff19f
Harden production readiness
CoreyLeath-code Jul 17, 2026
6963e03
Harden production readiness
CoreyLeath-code Jul 17, 2026
34cde54
Harden production readiness
CoreyLeath-code Jul 17, 2026
2de784a
Harden production readiness
CoreyLeath-code Jul 17, 2026
3cb1d5e
Harden production readiness
CoreyLeath-code Jul 17, 2026
ba6ae0f
Harden production readiness
CoreyLeath-code Jul 17, 2026
f255c73
Add production readiness controls
CoreyLeath-code Jul 17, 2026
8998a33
Add production readiness controls
CoreyLeath-code Jul 17, 2026
5144855
Add production readiness controls
CoreyLeath-code Jul 17, 2026
e563c85
Add production readiness controls
CoreyLeath-code Jul 17, 2026
7f49a28
Add production readiness controls
CoreyLeath-code Jul 17, 2026
f062b10
Add production readiness controls
CoreyLeath-code Jul 17, 2026
5bce409
Add production readiness controls
CoreyLeath-code Jul 17, 2026
2fc7c84
Add production readiness controls
CoreyLeath-code Jul 17, 2026
0efaa88
Add production readiness controls
CoreyLeath-code Jul 17, 2026
cd4873f
Remove false-green workflow
CoreyLeath-code Jul 17, 2026
45a62cf
Remove false-green workflow
CoreyLeath-code Jul 17, 2026
d371d5d
Remove false-green workflow
CoreyLeath-code Jul 17, 2026
683cd81
Remove false-green workflow
CoreyLeath-code Jul 17, 2026
1a8d423
Remove false-green workflow
CoreyLeath-code Jul 17, 2026
9baabeb
Remove false-green workflow
CoreyLeath-code Jul 17, 2026
9140428
Fix quality and security CI failures
CoreyLeath-code Jul 17, 2026
c9a54e7
Fix quality and security CI failures
CoreyLeath-code Jul 17, 2026
aea5e56
Fix quality and security CI failures
CoreyLeath-code Jul 17, 2026
2163665
Fix quality and security CI failures
CoreyLeath-code Jul 17, 2026
4c7e849
Fix quality and security CI failures
CoreyLeath-code Jul 17, 2026
18b0222
Fix quality and security CI failures
CoreyLeath-code Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
groups:
python-dependencies:
patterns: ["*"]
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions:
patterns: ["*"]
33 changes: 0 additions & 33 deletions .github/workflows/benchmarks.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/ci-cd.yml

This file was deleted.

96 changes: 77 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,89 @@
name: Code Quality Assurance
name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
style-compliance:
name: Code Hygiene Enforcement
quality:
runs-on: ubuntu-latest

steps:
- name: ⬇️ Checkout Repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workflow around all checkout steps.
git ls-files .github/workflows/ci.yml
echo "----"
nl -ba .github/workflows/ci.yml | sed -n '1,140p'
echo "----"
rg -n "actions/checkout@v4|persist-credentials|fetch-depth" .github/workflows/ci.yml

Repository: CoreyLeath-code/LogSight-AI

Length of output: 235


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "---- file ----"
awk '{printf "%5d  %s\n", NR, $0}' .github/workflows/ci.yml | sed -n '1,160p'
echo "---- matches ----"
rg -n "actions/checkout@v4|persist-credentials|fetch-depth" .github/workflows/ci.yml

Repository: CoreyLeath-code/LogSight-AI

Length of output: 3436


Disable persisted checkout credentials. These jobs run PR-controlled code, so leaving the default checkout token in git config lets that code read it. Set persist-credentials: false on every actions/checkout@v4 step, and keep fetch-depth: 0 only in the security job.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 20-20: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 20, Add persist-credentials: false to every
actions/checkout@v4 step in the workflow. Retain fetch-depth: 0 only on the
security job’s checkout step, removing it from other checkout steps while
preserving their remaining configuration.

Source: Linters/SAST tools

- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- run: python -m pip install --upgrade pip "setuptools>=83" && pip install -e ".[dev]"
- run: ruff format --check .
- run: ruff check .
Comment on lines +26 to +27

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Limit Ruff CI to files that actually pass

With this workflow change, both Ruff steps scan the entire repository, but the retained prototype files are not Ruff-clean. I ran the exact commands from the job: ruff format --check . wants to reformat agents/guards.py, agents/orchestrator.py, app.py, demo.app.py, and log_simulator.py, and ruff check . fails on existing import/whitespace/E701/F401 issues in those same demo/prototype areas. Since this job runs on every push/PR, CI is blocked until those files are formatted/fixed or the Ruff scope is limited to the supported package/tests.

Useful? React with 👍 / 👎.

- run: mypy
- run: pytest
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: coverage.xml

- name: 🐍 Set up Python
uses: actions/setup-python@v5
package-and-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
python-version: "3.11"
- run: pip install build
- run: python -m build
- run: docker build --tag logsight-ai:${{ github.sha }} .

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Copy README before building the Docker wheel

The new container job now makes the existing Dockerfile part of required CI, but that builder stage only copies pyproject.toml, requirements.txt, and logsight/ before running python -m build; pyproject.toml declares readme = "README.md", so metadata generation inside the Docker build context is missing the README that exists at the repository root. In the package-and-container workflow I inspected, this docker build step will fail even though python -m build at the checkout root can see the file; copy README.md (and any other declared metadata files) into the builder stage before building the wheel.

Useful? React with 👍 / 👎.

- run: docker run --rm logsight-ai:${{ github.sha }} health

- name: 📦 Provision Linting Binaries
run: |
python -m pip install --upgrade pip
pip install flake8
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: python -m pip install --upgrade "setuptools>=83" && pip install -e ".[dev]"
- run: bandit -c pyproject.toml -r logsight
- run: pip-audit
- run: pip-licenses --format=json --output-file=licenses.json
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: anchore/sbom-action@v0
with:
path: .
format: spdx-json
output-file: sbom.spdx.json
- uses: actions/upload-artifact@v4
with:
name: security-inventory
path: |
sbom.spdx.json
licenses.json

# UPDATED STEP: Explicitly ignores E261 inline comment spacing to clear the final roadblock
- name: 🚀 Verify PEP 8 Alignment
run: flake8 . --ignore=W293,W291,F401,E302,E305,E701,E203,E501,E261 --exclude=venv,.git,__pycache__,build,dist
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- run: pip install -e ".[dev]"
- run: mkdir -p benchmarks && pytest tests/test_benchmarks.py --benchmark-only --benchmark-json=benchmarks/latest.json --no-cov
- uses: actions/upload-artifact@v4
with:
name: benchmark-${{ github.sha }}
path: benchmarks/latest.json
23 changes: 23 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "17 6 * * 1"

permissions:
contents: read
security-events: write

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: python
- uses: github/codeql-action/analyze@v3
33 changes: 0 additions & 33 deletions .github/workflows/data-validation.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/release.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/sast.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/security.yml

This file was deleted.

6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ── Stage 1: build ──────────────────────────────────────────────────────────
# ── Stage 1: build ──────────────────────────────────────────────────────────
FROM python:3.11-slim AS builder

WORKDIR /app
Expand All @@ -13,7 +13,7 @@ COPY logsight/ logsight/
# Build the wheel
RUN python -m build --wheel --outdir /dist

# ── Stage 2: runtime ─────────────────────────────────────────────────────────
# ── Stage 2: runtime ─────────────────────────────────────────────────────────
FROM python:3.11-slim AS runtime

LABEL maintainer="Trojan3877" \
Expand All @@ -32,5 +32,7 @@ RUN pip install --no-cache-dir /tmp/*.whl && rm /tmp/*.whl
# Drop privileges
USER logsight

HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ["logsight", "health"]

ENTRYPOINT ["logsight"]
CMD ["--help"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Corey Leath

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading