mcp-syslog-crunchtools 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. mcp_syslog_crunchtools-1.0.1/.gatehouse-ignore +2 -0
  2. mcp_syslog_crunchtools-1.0.1/.github/ISSUE_TEMPLATE/bug_report.yml +79 -0
  3. mcp_syslog_crunchtools-1.0.1/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. mcp_syslog_crunchtools-1.0.1/.github/ISSUE_TEMPLATE/feature_request.yml +73 -0
  5. mcp_syslog_crunchtools-1.0.1/.github/dependabot.yml +30 -0
  6. mcp_syslog_crunchtools-1.0.1/.github/workflows/ci.yml +55 -0
  7. mcp_syslog_crunchtools-1.0.1/.github/workflows/constitution.yml +21 -0
  8. mcp_syslog_crunchtools-1.0.1/.github/workflows/container.yml +110 -0
  9. mcp_syslog_crunchtools-1.0.1/.github/workflows/dependabot-automerge.yml +18 -0
  10. mcp_syslog_crunchtools-1.0.1/.github/workflows/gatehouse-retriage.yml +23 -0
  11. mcp_syslog_crunchtools-1.0.1/.github/workflows/gatehouse.yml +110 -0
  12. mcp_syslog_crunchtools-1.0.1/.github/workflows/publish.yml +29 -0
  13. mcp_syslog_crunchtools-1.0.1/.github/workflows/security.yml +80 -0
  14. mcp_syslog_crunchtools-1.0.1/.gitignore +96 -0
  15. mcp_syslog_crunchtools-1.0.1/.pre-commit-config.yaml +41 -0
  16. mcp_syslog_crunchtools-1.0.1/.specify/memory/constitution.md +103 -0
  17. mcp_syslog_crunchtools-1.0.1/CHANGELOG.md +26 -0
  18. mcp_syslog_crunchtools-1.0.1/Containerfile +50 -0
  19. mcp_syslog_crunchtools-1.0.1/LICENSE +661 -0
  20. mcp_syslog_crunchtools-1.0.1/PKG-INFO +152 -0
  21. mcp_syslog_crunchtools-1.0.1/README.md +127 -0
  22. mcp_syslog_crunchtools-1.0.1/SECURITY.md +24 -0
  23. mcp_syslog_crunchtools-1.0.1/deploy/nagios/mcp-syslog.cfg +32 -0
  24. mcp_syslog_crunchtools-1.0.1/deploy/nagios/nrpe-commands.cfg +6 -0
  25. mcp_syslog_crunchtools-1.0.1/gourmand-exceptions.toml +29 -0
  26. mcp_syslog_crunchtools-1.0.1/gourmand.toml +16 -0
  27. mcp_syslog_crunchtools-1.0.1/pyproject.toml +92 -0
  28. mcp_syslog_crunchtools-1.0.1/server.json +21 -0
  29. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/__init__.py +26 -0
  30. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/__main__.py +6 -0
  31. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/config.py +82 -0
  32. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/errors.py +37 -0
  33. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/parser.py +176 -0
  34. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/query.py +153 -0
  35. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/reader.py +160 -0
  36. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/server.py +194 -0
  37. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/tools/__init__.py +15 -0
  38. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/tools/context.py +46 -0
  39. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/tools/search.py +48 -0
  40. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/tools/sources.py +66 -0
  41. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/tools/stats.py +113 -0
  42. mcp_syslog_crunchtools-1.0.1/src/mcp_syslog_crunchtools/tools/tail.py +51 -0
  43. mcp_syslog_crunchtools-1.0.1/tests/__init__.py +0 -0
  44. mcp_syslog_crunchtools-1.0.1/tests/conftest.py +104 -0
  45. mcp_syslog_crunchtools-1.0.1/tests/test_parser.py +146 -0
  46. mcp_syslog_crunchtools-1.0.1/tests/test_security.py +74 -0
  47. mcp_syslog_crunchtools-1.0.1/tests/test_tools.py +190 -0
  48. mcp_syslog_crunchtools-1.0.1/uv.lock +2379 -0
@@ -0,0 +1,2 @@
1
+ # Paths Gatehouse never reviews (gitignore syntax). Read from the base branch in CI.
2
+ uv.lock
@@ -0,0 +1,79 @@
1
+ name: Bug Report
2
+ description: Report a bug or unexpected behavior
3
+ title: "[Bug]: "
4
+ labels: ["bug", "triage"]
5
+ body:
6
+ - type: textarea
7
+ id: description
8
+ attributes:
9
+ label: Bug Description
10
+ description: A clear description of the bug
11
+ placeholder: What happened?
12
+ validations:
13
+ required: true
14
+
15
+ - type: textarea
16
+ id: steps
17
+ attributes:
18
+ label: Steps to Reproduce
19
+ description: How can we reproduce this bug?
20
+ placeholder: |
21
+ 1. Call tool '...' with args '...'
22
+ 2. Observe error '...'
23
+ validations:
24
+ required: true
25
+
26
+ - type: textarea
27
+ id: expected
28
+ attributes:
29
+ label: Expected Behavior
30
+ description: What did you expect to happen?
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: actual
36
+ attributes:
37
+ label: Actual Behavior
38
+ description: What actually happened? Include error messages if available.
39
+ validations:
40
+ required: true
41
+
42
+ - type: dropdown
43
+ id: transport
44
+ attributes:
45
+ label: Transport
46
+ description: How are you running the MCP server?
47
+ options:
48
+ - stdio (uvx / pip)
49
+ - streamable-http (container / systemd)
50
+ - SSE
51
+ validations:
52
+ required: true
53
+
54
+ - type: dropdown
55
+ id: gitlab_instance
56
+ attributes:
57
+ label: GitLab Instance Type
58
+ options:
59
+ - gitlab.com
60
+ - Self-hosted (corporate/private)
61
+ - GitLab Community Edition
62
+ - GitLab Enterprise Edition
63
+ validations:
64
+ required: true
65
+
66
+ - type: input
67
+ id: version
68
+ attributes:
69
+ label: Server Version
70
+ description: Output of `mcp-gitlab-crunchtools --version` or pip show
71
+ placeholder: "0.3.2"
72
+ validations:
73
+ required: true
74
+
75
+ - type: textarea
76
+ id: additional
77
+ attributes:
78
+ label: Additional Context
79
+ description: Any other relevant information (logs, config, environment)
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: GitLab API Documentation
4
+ url: https://docs.gitlab.com/api/rest/
5
+ about: Check the GitLab REST API docs for endpoint behavior questions
@@ -0,0 +1,73 @@
1
+ name: Feature Request
2
+ description: Suggest a new tool or enhancement
3
+ title: "[Feature]: "
4
+ labels: ["enhancement", "triage"]
5
+ body:
6
+ - type: textarea
7
+ id: problem
8
+ attributes:
9
+ label: Problem Statement
10
+ description: What problem does this feature solve?
11
+ placeholder: I need to...
12
+ validations:
13
+ required: true
14
+
15
+ - type: textarea
16
+ id: solution
17
+ attributes:
18
+ label: Proposed Solution
19
+ description: Describe the tool or change you'd like
20
+ placeholder: |
21
+ Tool name: `do_something`
22
+ GitLab API endpoint: `POST /projects/:id/...`
23
+ Parameters: ...
24
+ validations:
25
+ required: true
26
+
27
+ - type: textarea
28
+ id: alternatives
29
+ attributes:
30
+ label: Alternatives Considered
31
+ description: What alternatives have you considered?
32
+
33
+ - type: dropdown
34
+ id: scope
35
+ attributes:
36
+ label: Tool Category
37
+ description: Which area does this feature belong to?
38
+ options:
39
+ - Projects / Groups
40
+ - Merge Requests
41
+ - Issues
42
+ - Pipelines / Jobs
43
+ - Files / Repository
44
+ - Branches
45
+ - Labels
46
+ - Users
47
+ - Releases
48
+ - Milestones
49
+ - Wiki
50
+ - Snippets
51
+ - Search
52
+ - Security / Config
53
+ - New Category
54
+ validations:
55
+ required: true
56
+
57
+ - type: dropdown
58
+ id: gitlab_api
59
+ attributes:
60
+ label: GitLab API Reference
61
+ description: Does this correspond to an existing GitLab REST API endpoint?
62
+ options:
63
+ - "Yes - documented in GitLab API docs"
64
+ - "No - new behavior / aggregation"
65
+ - "Not sure"
66
+ validations:
67
+ required: true
68
+
69
+ - type: textarea
70
+ id: additional
71
+ attributes:
72
+ label: Additional Context
73
+ description: Any other relevant information, API docs links, or examples
@@ -0,0 +1,30 @@
1
+ # Canonical Dependabot config for crunchtools Python projects using uv.
2
+ # Drop in as .github/dependabot.yml. See constitution.md Section XV.
3
+ #
4
+ # Covers both ecosystems that go stale silently if left unpinned:
5
+ # - uv: uv.lock (must be committed, never gitignored)
6
+ # - github-actions: `uses: some-action@vX.Y.Z` pins in .github/workflows/
7
+
8
+ version: 2
9
+ updates:
10
+ - package-ecosystem: "uv"
11
+ directory: "/"
12
+ schedule:
13
+ interval: "weekly"
14
+ groups:
15
+ minor-and-patch:
16
+ update-types:
17
+ - "minor"
18
+ - "patch"
19
+
20
+ - package-ecosystem: "github-actions"
21
+ directory: "/"
22
+ schedule:
23
+ interval: "weekly"
24
+ groups:
25
+ minor-and-patch:
26
+ update-types:
27
+ - "minor"
28
+ - "patch"
29
+ ignore:
30
+ - dependency-name: "crunchtools/constitution*"
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.10", "3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v7
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v7
22
+ with:
23
+ version: "latest"
24
+
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ run: uv python install ${{ matrix.python-version }}
27
+
28
+ - name: Install dependencies
29
+ run: uv sync --all-extras
30
+
31
+ - name: Run linter
32
+ run: uv run ruff check src tests
33
+
34
+ - name: Run type checker
35
+ run: uv run mypy src
36
+
37
+ # No credentials to inject: this server reads files, and the test suite
38
+ # builds its own log root under tmp_path.
39
+ - name: Run tests
40
+ run: uv run pytest -v
41
+
42
+ gourmand:
43
+ name: Code Quality (Gourmand)
44
+ uses: crunchtools/gatehouse/.github/workflows/gourmand.yml@v0.15.2
45
+
46
+ build-container:
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v7
50
+
51
+ - name: Build container image
52
+ run: docker build -f Containerfile -t mcp-syslog:test .
53
+
54
+ - name: Verify container
55
+ run: timeout 5 docker run --rm mcp-syslog:test || true
@@ -0,0 +1,21 @@
1
+ # Drop in as .github/workflows/constitution.yml. See constitution.md VII.
2
+ #
3
+ # The tag below is the constitution version this repo is judged by. It moves
4
+ # together with `Inherits:` in .specify/memory/constitution.md (scripts/fleet-bump.py
5
+ # opens that PR); Dependabot is told to ignore it, see examples/dependabot.yml.
6
+ # Required check: `Constitution / Validate constitution`.
7
+
8
+ name: Constitution
9
+
10
+ on:
11
+ pull_request:
12
+ push:
13
+ branches: [main, master]
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ jobs:
19
+ constitution:
20
+ name: Constitution
21
+ uses: crunchtools/constitution/.github/workflows/validate.yml@v1.18.0
@@ -0,0 +1,110 @@
1
+ name: Container Build & Push
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+
11
+ env:
12
+ QUAY_IMAGE: quay.io/crunchtools/mcp-syslog
13
+ GHCR_IMAGE: ghcr.io/crunchtools/mcp-syslog
14
+
15
+ jobs:
16
+ build-and-push-quay:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: read
20
+
21
+ steps:
22
+ - uses: actions/checkout@v7
23
+ - uses: docker/setup-buildx-action@v4
24
+
25
+ - name: Log in to Quay.io
26
+ if: github.event_name != 'pull_request'
27
+ uses: docker/login-action@v4
28
+ with:
29
+ registry: quay.io
30
+ username: ${{ secrets.QUAY_USERNAME }}
31
+ password: ${{ secrets.QUAY_PASSWORD }}
32
+
33
+ - name: Extract metadata
34
+ id: meta
35
+ uses: docker/metadata-action@v6
36
+ with:
37
+ images: ${{ env.QUAY_IMAGE }}
38
+ tags: |
39
+ type=ref,event=branch
40
+ type=ref,event=pr
41
+ type=semver,pattern={{version}}
42
+ type=semver,pattern={{major}}.{{minor}}
43
+ type=raw,value=latest,enable={{is_default_branch}}
44
+
45
+ - name: Build and push
46
+ uses: docker/build-push-action@v7
47
+ with:
48
+ context: .
49
+ file: ./Containerfile
50
+ push: ${{ github.event_name != 'pull_request' }}
51
+ tags: ${{ steps.meta.outputs.tags }}
52
+ labels: ${{ steps.meta.outputs.labels }}
53
+ cache-from: type=gha
54
+ cache-to: type=gha,mode=max
55
+
56
+ - name: Run Trivy vulnerability scanner
57
+ continue-on-error: true
58
+ if: github.event_name != 'pull_request'
59
+ uses: aquasecurity/trivy-action@v0.36.0
60
+ with:
61
+ image-ref: ${{ env.QUAY_IMAGE }}:latest
62
+ format: "table"
63
+ exit-code: "0"
64
+ severity: "CRITICAL,HIGH"
65
+
66
+ build-and-push-ghcr:
67
+ runs-on: ubuntu-latest
68
+ # needs: keeps Quay first, but always() decouples the two failure paths.
69
+ # The dual-push design exists so Quay succeeds independently of GHCR
70
+ # problems; a plain needs: makes the reverse true as well, and that is how
71
+ # a missing Quay repo (401 on first push) silently blocked GHCR from ever
72
+ # publishing anything at all.
73
+ needs: build-and-push-quay
74
+ if: always() && github.event_name != 'pull_request'
75
+ permissions:
76
+ contents: read
77
+ packages: write
78
+
79
+ steps:
80
+ - uses: actions/checkout@v7
81
+ - uses: docker/setup-buildx-action@v4
82
+
83
+ - name: Log in to GHCR
84
+ uses: docker/login-action@v4
85
+ with:
86
+ registry: ghcr.io
87
+ username: ${{ github.repository_owner }}
88
+ password: ${{ github.token }}
89
+
90
+ - name: Extract metadata
91
+ id: meta
92
+ uses: docker/metadata-action@v6
93
+ with:
94
+ images: ${{ env.GHCR_IMAGE }}
95
+ tags: |
96
+ type=ref,event=branch
97
+ type=ref,event=pr
98
+ type=semver,pattern={{version}}
99
+ type=semver,pattern={{major}}.{{minor}}
100
+ type=raw,value=latest,enable={{is_default_branch}}
101
+
102
+ - name: Build and push
103
+ uses: docker/build-push-action@v7
104
+ with:
105
+ context: .
106
+ file: ./Containerfile
107
+ push: true
108
+ tags: ${{ steps.meta.outputs.tags }}
109
+ labels: ${{ steps.meta.outputs.labels }}
110
+ cache-from: type=gha
@@ -0,0 +1,18 @@
1
+ # Drop in as .github/workflows/dependabot-automerge.yml. See constitution.md XV.
2
+ #
3
+ # Queues green GitHub Actions minor/patch bumps for auto-merge. Needs the repo
4
+ # setting `allow_auto_merge`; the required checks still decide the merge.
5
+
6
+ name: Dependabot auto-merge
7
+
8
+ on:
9
+ pull_request:
10
+
11
+ permissions:
12
+ contents: write
13
+ pull-requests: write
14
+
15
+ jobs:
16
+ automerge:
17
+ name: Dependabot
18
+ uses: crunchtools/constitution/.github/workflows/dependabot-automerge.yml@v1.18.0
@@ -0,0 +1,23 @@
1
+ # Gatehouse retriage — makes a reply to a finding clear the triage check.
2
+ #
3
+ # Drop this next to examples/gatehouse.yml. A reply re-runs the `Gatehouse`
4
+ # workflow, but that run's checks do not count toward branch rules; only the
5
+ # pull_request_target run's do. When the reply run finishes, this re-runs
6
+ # triage inside the pull_request_target run. `workflow_run` always executes
7
+ # the default-branch copy of this file, so a fork cannot alter it.
8
+
9
+ name: Gatehouse retriage
10
+
11
+ on:
12
+ workflow_run:
13
+ workflows: [Gatehouse] # the `name:` of your gatehouse.yml
14
+ types: [completed]
15
+
16
+ permissions: {} # default-deny
17
+
18
+ jobs:
19
+ retriage:
20
+ if: github.event.workflow_run.event == 'pull_request_review_comment'
21
+ permissions:
22
+ actions: write # re-run the triage job; nothing else
23
+ uses: crunchtools/gatehouse/.github/workflows/retriage.yml@v0.15.2
@@ -0,0 +1,110 @@
1
+ # Gatehouse — fork-safe code review + workflow protection, in ONE file.
2
+ #
3
+ # Drop this in your repo at .github/workflows/gatehouse.yml, add a OPENROUTER_API_KEY
4
+ # secret, and you get:
5
+ # • AI review of every PR (including from forks) — posted as a PR review
6
+ # • rejection of untrusted PRs that try to modify your workflow files
7
+ #
8
+ # Nothing is ever checked out from the PR. The fork's change is only ever read as
9
+ # a diff (data); the reviewer logic lives in the pinned gatehouse container; the
10
+ # rules (your styleguide/constitution) are fetched from YOUR base branch, not the
11
+ # PR. The one thing you don't trust — the proposed change — is only ever read.
12
+ #
13
+ # Three jobs with DIFFERENT authority:
14
+ # • guard — a real blocking gate. Mark it a REQUIRED status check so a PR
15
+ # that tampers with your workflow files is rejected.
16
+ # • review — ADVISORY. It posts findings as PR comments and always passes;
17
+ # do NOT mark it required. An LLM reviewer is non-deterministic,
18
+ # so it must never hold merge authority. (Opt into blocking with
19
+ # `blocking: true` below only if you accept that tradeoff — and
20
+ # even then, keep it out of branch protection.)
21
+ # • triage — deterministic. Fails while any finding has no reply
22
+ # (`fixed in <sha>` or `not a bug: <reason>`). Safe to mark
23
+ # REQUIRED: it never judges code, only whether a human answered.
24
+
25
+ name: Gatehouse
26
+
27
+ on:
28
+ pull_request_target:
29
+ types: [opened, synchronize, reopened]
30
+ # A reply rings the doorbell: this run's own checks do not count toward
31
+ # branch rules, so examples/gatehouse-retriage.yml answers it by re-running
32
+ # triage inside the pull_request_target run. Add that file too.
33
+ pull_request_review_comment:
34
+ types: [created, edited, deleted]
35
+
36
+ permissions: {} # default-deny; each job grants only what it needs
37
+
38
+ jobs:
39
+ # ── 1) Protect the workflow files themselves ────────────────────────────────
40
+ # Rejects PRs from forks that touch .github/workflows/. Safe under
41
+ # pull_request_target because it only reads the changed-file LIST via the
42
+ # API — it never checks out or runs your code. And because pull_request_target
43
+ # runs the BASE version of this file, a PR can't edit this job to disable it.
44
+ guard:
45
+ name: Protect workflows
46
+ # Runs on replies too. A job skipped on the reply event reports
47
+ # "skipped", which a required check counts as passing: skipping the
48
+ # guard there would let any comment on a rejected fork PR clear it.
49
+ runs-on: ubuntu-latest
50
+ permissions:
51
+ contents: read
52
+ pull-requests: write
53
+ steps:
54
+ - name: Reject workflow changes from untrusted PRs
55
+ env:
56
+ GH_TOKEN: ${{ github.token }}
57
+ EVENT: ${{ github.event_name }}
58
+ PR: ${{ github.event.pull_request.number }}
59
+ HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
60
+ run: |
61
+ set -euo pipefail
62
+ # Gate on where the branch lives, not on the author's role: a branch
63
+ # pushed into this repo already required write access, and a fork is
64
+ # what pull_request_target actually guards against.
65
+ if [ "$HEAD_REPO" = "$GITHUB_REPOSITORY" ]; then
66
+ echo "Head branch is in $GITHUB_REPOSITORY; allowing."; exit 0
67
+ fi
68
+ # Both sides of a rename: `gh pr diff --name-only` lists only the new
69
+ # path, so a fork could move a workflow out of .github/workflows/ unseen.
70
+ changed="$(gh api --paginate "repos/$GITHUB_REPOSITORY/pulls/$PR/files" \
71
+ --jq '.[] | .filename, (.previous_filename // empty)')"
72
+ if echo "$changed" | grep -qE '^\.github/workflows/'; then
73
+ echo "::error::PR modifies .github/workflows/ — not accepted from external contributors."
74
+ # Explain once, on the PR event; replies re-run the check, not the comment.
75
+ if [ "$EVENT" = "pull_request_target" ]; then
76
+ gh pr comment "$PR" --repo "$GITHUB_REPOSITORY" --body \
77
+ $'🚫 **Workflow changes are not accepted via pull request.** Please open an issue and a maintainer will make the change.'
78
+ fi
79
+ exit 1
80
+ fi
81
+ echo "No workflow files changed."
82
+
83
+ # ── 2) Review the PR diff (no checkout, BYO key) ────────────────────────────
84
+ # The reviewer is maintained centrally in gatehouse's reusable workflow and the
85
+ # pinned container — so security fixes reach you without copying logic around.
86
+ # Scope OPENROUTER_API_KEY to this reusable workflow so only it can read the key.
87
+ review:
88
+ name: Gatehouse review
89
+ if: github.event_name == 'pull_request_target'
90
+ permissions:
91
+ contents: read
92
+ pull-requests: write
93
+ uses: crunchtools/gatehouse/.github/workflows/review.yml@v0.15.2
94
+ # Advisory by default — findings post as comments, the check always passes.
95
+ # Uncomment to let critical/high findings fail the check (still not required):
96
+ # with:
97
+ # blocking: true
98
+ secrets:
99
+ OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
100
+
101
+ # ── 3) Every finding answered ──────────────────────────────────────────────
102
+ # Runs after the review on a push, and alone on a reply (review is skipped
103
+ # then, hence always()). Read-only, no secrets.
104
+ triage:
105
+ name: Gatehouse triage
106
+ needs: review
107
+ if: always()
108
+ permissions:
109
+ pull-requests: read
110
+ uses: crunchtools/gatehouse/.github/workflows/triage.yml@v0.15.2
@@ -0,0 +1,29 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write
13
+
14
+ steps:
15
+ - uses: actions/checkout@v7
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v7
19
+ with:
20
+ version: "latest"
21
+
22
+ - name: Set up Python
23
+ run: uv python install 3.12
24
+
25
+ - name: Build package
26
+ run: uv build
27
+
28
+ - name: Publish to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,80 @@
1
+ name: Security Scan
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 9 * * 1"
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ issues: write
15
+ pull-requests: write
16
+ security-events: write
17
+
18
+ jobs:
19
+ dependency-audit:
20
+ name: Dependency CVE Scan
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - uses: actions/checkout@v7
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ version: "latest"
29
+
30
+ - name: Set up Python
31
+ run: uv python install 3.12
32
+
33
+ - name: Install dependencies
34
+ run: uv sync
35
+
36
+ - name: Install pip-audit
37
+ run: uv pip install pip-audit
38
+
39
+ - name: Run pip-audit
40
+ run: uv run pip-audit || true
41
+
42
+ container-scan:
43
+ name: Container Security Scan
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v7
47
+
48
+ - name: Build container image
49
+ run: docker build -f Containerfile -t mcp-syslog:scan .
50
+
51
+ - name: Run Trivy vulnerability scanner
52
+ uses: aquasecurity/trivy-action@v0.36.0
53
+ with:
54
+ image-ref: "mcp-syslog:scan"
55
+ format: "sarif"
56
+ output: "trivy-results.sarif"
57
+ severity: "CRITICAL,HIGH"
58
+
59
+ - name: Upload Trivy scan results
60
+ uses: github/codeql-action/upload-sarif@v4
61
+ if: always()
62
+ with:
63
+ sarif_file: "trivy-results.sarif"
64
+
65
+ codeql:
66
+ name: CodeQL Analysis
67
+ runs-on: ubuntu-latest
68
+ steps:
69
+ - uses: actions/checkout@v7
70
+
71
+ - name: Initialize CodeQL
72
+ uses: github/codeql-action/init@v4
73
+ with:
74
+ languages: python
75
+ queries: security-extended
76
+
77
+ - name: Perform CodeQL Analysis
78
+ uses: github/codeql-action/analyze@v4
79
+ with:
80
+ category: "/language:python"