Skip to content

Commit e5082e2

Browse files
authored
Merge branch 'main' into copilot/fix-16
2 parents 83ecfca + 47db85f commit e5082e2

File tree

14 files changed

+722
-362
lines changed

14 files changed

+722
-362
lines changed

.github/workflows/Continuous.yml

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,78 @@ on:
88
branches:
99
- main
1010
release:
11-
types: [created]
11+
types:
12+
- created
13+
14+
permissions:
15+
contents: read
16+
packages: none
17+
id-token: none
18+
attestations: none
1219

1320
jobs:
14-
ubuntu-latest:
15-
name: ubuntu-latest
16-
runs-on: ubuntu-latest
21+
build:
22+
name: Build & Push
23+
runs-on: ubuntu-24.04
24+
25+
permissions:
26+
contents: read
27+
packages: write
28+
id-token: write
29+
attestations: write
30+
1731
steps:
18-
- uses: actions/checkout@v4
32+
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1934
with:
2035
fetch-depth: 0
36+
2137
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
22-
uses: actions/cache@v4
38+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
2339
with:
2440
path: |
2541
.nuke/temp
2642
~/.nuget/packages
2743
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
44+
45+
- name: Cache Trivy DB
46+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
47+
with:
48+
path: .trivy-cache
49+
key: ${{ runner.os }}-trivy-cache
50+
2851
- name: 'Run: Push'
2952
run: ./build.cmd Push
3053
env:
3154
FeedGitHubToken: ${{ secrets.FEED_GITHUB_TOKEN }}
3255
NuGetApiKey: ${{ secrets.NUGET_API_KEY }}
56+
3357
- name: Report Coveralls
34-
uses: coverallsapp/github-action@v2
58+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b
59+
3560
- name: 'Publish: Artifacts'
36-
uses: actions/upload-artifact@v4
61+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
3762
with:
3863
name: Artifacts
3964
path: Artifacts
65+
66+
# Upload the Software Bill of Materials (SBOM) for this build, to enable downstream trust/analysis
67+
- name: Upload SBOM
68+
if: >
69+
(github.event_name == 'release') ||
70+
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'dendrodocs/dotnet-tool')
71+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
72+
with:
73+
name: SBOM
74+
path: Sbom/_manifest/spdx_2.2/manifest.spdx.json
75+
76+
# Use GitHub's attest-sbom action to cryptographically tie the SBOM to the artifacts + their checksums
77+
# (SLSA provenance proof, can be verified by downstream consumers)
78+
- name: Attest SBOM
79+
if: >
80+
(github.event_name == 'release') ||
81+
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'dendrodocs/dotnet-tool')
82+
uses: actions/attest-sbom@bd218ad0dbcb3e146bd073d1d9c6d78e08aa8a0b
83+
with:
84+
sbom-path: Sbom/_manifest/spdx_2.2/manifest.spdx.json
85+
subject-checksums: Artifacts/SHA256SUMS

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,9 @@ paket-files/
263263
*.sln.iml
264264
pub/
265265

266-
**/launchSettings.json
266+
**/launchSettings.json
267+
268+
.trivy-cache
269+
.nuke/temp
270+
[Aa]rtifacts
271+
[Ss]bom

.nuke/build.schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,21 @@
2424
"ExecutableTarget": {
2525
"type": "string",
2626
"enum": [
27+
"Audit",
2728
"CalculateVersion",
2829
"Clean",
2930
"CodeCoverage",
3031
"Compile",
3132
"Pack",
33+
"Proof",
3234
"Push",
3335
"PushGithub",
3436
"PushNuget",
3537
"Restore",
36-
"UnitTests"
38+
"SbomDeliverable",
39+
"ScanSource",
40+
"UnitTests",
41+
"VerifyCleanGit"
3742
]
3843
},
3944
"Verbosity": {

.trivyignore.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
vulnerabilities:
2+
- id: CVE-2025-26646
3+
purls:
4+
- "pkg:nuget/[email protected]"
5+
statement: Microsoft.Build.Tasks.Core 17.11.31 is believed to be a fixed version, incorrectly not marked as such.

Directory.Packages.props

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77
<PackageVersion Include="Buildalyzer.Workspaces" Version="7.1.0" />
88
<PackageVersion Include="CommandLineParser" Version="2.9.1" />
99
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
10-
<PackageVersion Include="DendroDocs.Shared" Version="0.3.0" />
1110
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="8.0.0" />
11+
<PackageVersion Include="DendroDocs.Shared" Version="0.4.2" />
1212
<PackageVersion Include="Newtonsoft.Json.Schema" Version="4.0.1" />
1313
<PackageVersion Include="Nuke.Common" Version="9.0.4" />
1414
<PackageVersion Include="Nuke.Components" Version="9.0.4" />
1515
<PackageVersion Include="Microsoft.Build" Version="17.11.31" />
16+
<PackageVersion Include="Microsoft.Build.Framework" Version="17.11.31" />
1617
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="17.11.31" />
17-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.12.0" />
18-
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.12.0" />
19-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
18+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
19+
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="4.14.0" />
20+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
2021
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
21-
<PackageVersion Include="MSTest.TestAdapter" Version="2.2.10" />
22-
<PackageVersion Include="MSTest.TestFramework" Version="2.2.10" />
22+
<PackageVersion Include="MSTest.TestAdapter" Version="3.10.1" />
23+
<PackageVersion Include="MSTest.TestFramework" Version="3.10.1" />
2324
<PackageVersion Include="Shouldly" Version="4.3.0" />
2425
</ItemGroup>
2526
</Project>

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ dendrodocs-analyze --folder /path/to/projects --exclude /path/to/unwanted.csproj
4949
The output of **DendroDocs.Tool** is a comprehensive JSON file that conforms to the schema defined in the [DendroDocs Schema](https://github.com/dendrodocs/schema).
5050
This JSON file provides a representation of your source code, which can be used to generate various types of documentation or integrate with other tools in your development pipeline.
5151

52+
## Security & Build Attestation
53+
54+
This library includes build attestation through GitHub's attest-build-provenance action, providing cryptographic proof of the build process and artifact integrity. Each published package includes verifiable provenance information that demonstrates:
55+
56+
* The exact repository and commit that built the artifacts
57+
* The GitHub Actions workflow that produced the packages
58+
* Cryptographic signatures ensuring artifact authenticity
59+
60+
This ensures that the packages you install have not been tampered with and came from the official DendroDocs build pipeline.
61+
5262
## The DendroDocs Ecosystem
5363

5464
**DendroDocs.Tool** is part of the broader DendroDocs ecosystem.

0 commit comments

Comments
 (0)