-
Notifications
You must be signed in to change notification settings - Fork 0
Harden LogSight-AI for production readiness #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c45f8b4
79ba85a
b840d3d
65d29e1
a3ffba9
646d7dd
750bbab
5aedc75
b1ff19f
6963e03
34cde54
2de784a
3cb1d5e
ba6ae0f
f255c73
8998a33
5144855
e563c85
7f49a28
f062b10
5bce409
2fc7c84
0efaa88
cd4873f
45a62cf
d371d5d
683cd81
1a8d423
9baabeb
9140428
c9a54e7
aea5e56
2163665
4c7e849
18b0222
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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: ["*"] |
This file was deleted.
This file was deleted.
| 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 | ||
| - 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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: 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 }} . | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new container job now makes the existing Dockerfile part of required CI, but that builder stage only copies 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 | ||
| 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 |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| 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. |
There was a problem hiding this comment.
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:
Repository: CoreyLeath-code/LogSight-AI
Length of output: 235
🏁 Script executed:
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: falseon everyactions/checkout@v4step, and keepfetch-depth: 0only 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
Source: Linters/SAST tools