Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2

multi-ecosystem-groups:
monthly-dependencies:
schedule:
interval: "monthly"

updates:
- package-ecosystem: "nuget"
directory: "/"
patterns: ["*"]
multi-ecosystem-group: "monthly-dependencies"

- package-ecosystem: "github-actions"
directory: "/"
patterns: ["*"]
multi-ecosystem-group: "monthly-dependencies"
52 changes: 20 additions & 32 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,13 @@ on:
workflow_dispatch:

jobs:
analyse:
name: Static Analysis
pipeline:
name: Build, Test and Publish
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: true
matrix:
language: ["csharp"]

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Initialize
id: initialize
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Build
id: build
uses: github/codeql-action/autobuild@v2

- name: Analysis
id: analysis
uses: github/codeql-action/analyze@v2

pipeline:
name: Build, Test and Publish
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -103,7 +74,7 @@ jobs:

- name: Analysis
id: analysis
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7
with:
files: ./out/coverage.opencover.xml
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -123,6 +94,23 @@ jobs:
VERSION_SUFFIX: ${{ steps.initialize.outputs.version_suffix }}
DOCKER_TAG: ${{ steps.initialize.outputs.docker_tag }}

- name: Scan
id: scan
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
image-ref: ${{ steps.initialize.outputs.name }}:${{ steps.initialize.outputs.docker_tag }}
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
ignore-unfixed: true

- name: Upload Scan
id: upload-scan
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: trivy-results.sarif
category: trivy

- name: Docker Login
id: login
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 3 * * 1"
workflow_dispatch:

jobs:
analyse:
name: Static Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: true
matrix:
language: ["actions", "csharp"]

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Initialize
id: initialize
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: none
queries: security-and-quality

- name: Analysis
id: analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{ matrix.language }}"
49 changes: 0 additions & 49 deletions .github/workflows/dependecy-updates.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: OpenSSF Scorecard

on:
branch_protection_rule:
push:
branches: [main]
schedule:
- cron: "0 4 * * 1"
workflow_dispatch:

permissions: read-all

jobs:
analysis:
name: Scorecard Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Analysis
id: analysis
uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true

- name: Upload
id: upload
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RUN dotnet build --no-restore -c Release -v minimal -p:VersionPrefix=${VERSION_P

# Dotnet Test
FROM build AS test
RUN dotnet test --no-restore --no-build -c Release -v minimal -p:CollectCoverage=true -p:CoverletOutput=../results/ -p:MergeWith="../results/coverage.json" -p:CoverletOutputFormat=opencover%2cjson -m:1 -p:ExcludeByFile="**/program.cs"
RUN dotnet test --no-restore --no-build -c Release -v minimal -p:CollectCoverage=true -p:CoverletOutput=../results/ -p:MergeWith="../results/coverage.json" -p:CoverletOutputFormat=opencover%2cjson -m:1 -p:ExcludeByFile="**/Program.cs"

FROM scratch AS coverage
COPY --from=test /sln/tests/results/*.xml .
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/stphnwlsh/cleanmodelcontextprotocol/build-pipeline.yml?label=Build%20Pipeline%20&logo=github&style=for-the-badge)](https://github.com/stphnwlsh/CleanModelContextProtocol/actions/workflows/build-pipeline.yml)
[![Codecov](https://img.shields.io/codecov/c/github/stphnwlsh/CleanModelContextProtocol?label=Code%20Coverage&logo=codecov&logoColor=white&style=for-the-badge)](https://codecov.io/gh/stphnwlsh/CleanModelContextProtocol)
[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/stphnwlsh/CleanModelContextProtocol?label=OpenSSF%20Scorecard&style=for-the-badge)](https://scorecard.dev/viewer/?uri=github.com/stphnwlsh/CleanModelContextProtocol)
[![Nuget](https://img.shields.io/nuget/v/CleanModelContextProtocol.Template?label=nuget%20template&logo=nuget&logoColor=white&style=for-the-badge)](https://www.nuget.org/packages/CleanModelContextProtocol.Template/)
[![GitHub Sponsors](https://img.shields.io/static/v1?label=GitHub%20Sponsors&message=$1&logo=githubsponsors&logoColor=white&color=ea4aaa&style=for-the-badge)](https://github.com/sponsors/stphnwlsh/sponsorships?sponsor=stphnwlsh&tier_id=333950)
[![Buy Me A Coffee](https://img.shields.io/static/v1?label=Buy%20Me%20A%20Coffee&message=$1&logo=buymeacoffee&logoColor=white&color=ffdd00&style=for-the-badge)](https://www.buymeacoffee.com/stphnwlsh)
Expand Down
13 changes: 13 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Security Policy

## Supported Versions

Security fixes are made on the `main` branch and released in the latest version of the template on NuGet.

## Reporting a Vulnerability

Please don't report security vulnerabilities through public GitHub issues.

Report them privately through GitHub's [private vulnerability reporting](https://github.com/stphnwlsh/CleanModelContextProtocol/security/advisories/new) instead. Include as much detail as you can: what's affected, how to reproduce it, and the impact you expect.

You'll get a response within 7 days. Once the issue is confirmed, a fix will be released as soon as possible, and you'll be credited in the advisory unless you'd prefer not to be.
6 changes: 4 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ coverage:
status:
project:
default:
target: 100%
threshold: 2%
target: 95%
patch:
default:
target: 95%
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "10.0.1",
"version": "10.0.100",
"allowPrerelease": false,
"rollForward": "latestFeature"
}
Expand Down
6 changes: 0 additions & 6 deletions src/Presentation/Filters/ValidationAttribute.cs

This file was deleted.

10 changes: 0 additions & 10 deletions src/Presentation/Filters/ValidationDescriptor.cs

This file was deleted.

60 changes: 0 additions & 60 deletions src/Presentation/Filters/ValidationFilter.cs

This file was deleted.

Loading