You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fill in the roadmap, the maintainers and the assurance case #35
The update to project-template v0.145.1 (#26) added the documents the OpenSSF Best Practices silver level asks for (the template's ADR-0023). Their facts about the code were filled in (docs/architecture.md's Components), but these sections state the maintainers' own plans and commitments, and still hold the template's prompts:
ROADMAP.md: Next Twelve Months and Not Planned (Nothing is ruled out yet.).
GOVERNANCE.md: the Maintainer row and Owners today: name no one; the prompt asks to name the owners and keep the list current.
docs/assurance-case.md: Security Requirements, Threat Model, Secure Design Principles Applied and Common Weaknesses Countered say Not written yet., and Security Reviews None recorded yet.
Fill each from the maintainers' decisions, deleting each [//]: # "Maintainers: ..." prompt once its section is written. NCode Review raised it as F6 on #34.
ROADMAP.md, GOVERNANCE.md and docs/assurance-case.md still hold the project template's [//]: # "Maintainers: ..."
prompts and placeholders (Not written yet., Nothing is ruled out yet., The repository's owners). Write each section
from evidence that can be checked: GitHub's collaborator and organization lists, the open issues, the decision records,
the code of the two packages and the repository's CI and ruleset settings. Delete each prompt once its section is
written, so the OpenSSF Best Practices silver documents (template ADR-0023) say what the project actually does.
Context for the executor
Build: dotnet build
Test: dotnet test
Gate: ./build/dod.ps1 -Fast
Conventions: Markdown lines wrap at 120 characters like the rest of each file; links in docs/assurance-case.md are
relative to docs/ (decisions/..., ../SECURITY.md), links in ROADMAP.md and GOVERNANCE.md are relative to the
root; issues are linked as [#33](https://github.com/NCodeGroup/Mediator/issues/33). Follow the shape of the same
sections in NCodeGroup/brand's docs/assurance-case.md (requirements R1..Rn, a threat table with Threat, In scope,
Countered by, principles as bold-labelled bullets, CWEs as bullets naming the requirement).
Facts gathered on 2026-11-29 (use them as written, claim nothing beyond them):
gh api repos/NCodeGroup/Mediator/collaborators: one collaborator, polewskm, role admin. gh api orgs/NCodeGroup/members?role=admin: polewskm only; the organization has no other member.
nuget.org: NCode.Mediator and NCode.Mediator.Abstractions 1.0.0 are owned by the nuget.org account NCode
(https://www.nuget.org/profiles/NCode), on a verified ID prefix; nuget.org doesn't show that account's members.
Ruleset Protect main (no bypass actors): no deletion, no force push, pull request with one approval of the last
push, stale approvals dismissed, every review thread resolved, merge methods merge and rebase; required status
checks build, build-and-test, test, branch up to date; code scanning rule: CodeQL alerts at errors and
warnings, security alerts of any severity. Ruleset Protect release tags (refs/tags/v*): no deletion, no update.
Repository: public; private vulnerability reporting on; secret scanning and push protection on; Dependabot
security updates on.
.github/workflows/ci.yml: top-level contents: read, checkouts with persist-credentials: false, actions pinned
by full commit SHA; build-and-test runs ./build/dod.ps1 (decision index, Release build with warnings as errors
and FailOnNuGetAdvisories, tests, pack); reproducible-build runs ./.template/Test-ReproducibleBuild.ps1
(template ADR-0154), not a required check. Check .NET support runs with -WarnOnly until Move the packages off .NET 8, past its end of support #33.
.github/workflows/main.yml (jobs build, test, publish): build and test are required checks; publish
runs only on a published GitHub release, holds contents: write, uploads the packages to the release and pushes
them to nuget.org with the NUGET_APIKEY repository secret. Its actions/* steps use version tags
(actions/checkout@v7), not commit SHAs; only dorny/test-reporter is pinned by SHA. Its publish job expands github.event.release.tag_name and the key inside run:. No build provenance attestation is made. Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25 tracks
trusted publishing, retiring its CI and hardening it.
.github/workflows/codeql.yml: CodeQL security-extended on actions and csharp on every pull request, push
to main, merge group and weekly. .github/workflows/scorecard.yml: OpenSSF Scorecard on each push to main and
weekly. .github/workflows/code-review.yml: NCode Review (NCodeGroup/code-review, pinned by SHA, v1.7.0) runs
from the default branch through pull_request_target, reviews each pull request when it opens or is marked ready
and on a writer's /review, never builds or runs the pull request's code, and its approver app's approval meets
the ruleset's required approval.
.github/dependabot.yml: weekly github-actions, nuget and dotnet-sdk updates, three-day cooldown, security
updates grouped. nuget.config clears every source and adds only nuget.org.
build/ProjectTemplate.props: warnings as errors, latest-recommended analyzers, banned APIs, null-forgiving
operator banned outside tests, ContinuousIntegrationBuild in CI, Source Link with embedded untracked sources, .snupkg symbols, package validation against PackageValidationBaselineVersion 1.0.0 (Directory.Build.props). .copier-answers.yml has coverage_gate: false: coverage is not measured or gated.
Code (NCode.Mediator/, NCode.Mediator.Abstractions/): AddMediator (DefaultRegistration.cs) registers only
the library's own types, scoped, with TryAdd; it scans no assembly. DefaultMediator.SendAsync resolves ICommandHandlerWrapper<TCommand> or ICommandResponseHandlerWrapper<TCommand,TResponse> with GetRequiredService; PolymorphicSendAsync builds that type with MakeGenericType(command.GetType()) and is [RequiresDynamicCode]. The standard middleware (Middleware/Standard*.cs, [RequiresDynamicCode]) runs
pre-processors, then next(), then post-processors; on any exception it notifies the listener wrapper and the
handler wrapper resolved for exception.GetType(), returns or completes only when state.IsHandled, and
otherwise throw;. The exception-handler wrappers stop at the first handler that sets handled. Every pipeline
list is sorted with OrderByDescending(MediatorPriority) (0 without ISupportMediatorPriority), a stable sort.
The library writes no log, opens no file, socket or process, serializes nothing and keeps no command, response or
exception after the call. DefaultMediatorPriorities.High and Low are public static settable properties.
Gotchas: never edit the template-owned files (docs/decisions/project-template/, build/dod.ps1, ...). Leave docs/architecture.md's, SECURITY.md's and docs/best-practices-badge.md's own prompts alone: Fill in the roadmap, the maintainers and the assurance case #35 covers only
the three files.
Decisions
Kind: docs (the issue's only label, follow-up, maps to no kind; it asks for documentation).
Next Twelve Months comes from the open issues and the template's ADRs; Not Planned keeps a factual statement, since
no ADR or document of this project rules a feature out.
Security Reviews records that no independent security review has been done, and what reviews every change.
R3 (a throwing pre-processor stops the handler) had no assertion that the handler is skipped: step 1 adds it to the
two existing tests, so the evidence names a test for each requirement.
No Release: line: release: none, and the plan changes only docs and tests; the changelog entry goes under ## [Unreleased].
Out of scope
Any change to code under NCode.Mediator/ or NCode.Mediator.Abstractions/, to workflows or to settings.
Change: in each file's HandleAsync_WhenPreProcessorThrows_NotifiesListenersAndInvokesHandlers, add var nextInvoked = false; and pass a next delegate that sets it (() => { nextInvoked = true; return ...; }),
then Assert.False(nextInvoked); after the existing asserts.
Pattern: the listenerInvoked flag in the same test.
[ ] 2. Name the maintainer and the owners in GOVERNANCE.md
Files: GOVERNANCE.md (edit)
Change: delete both [//]: # "Maintainers: ..." lines; Maintainer row's Who becomes [@polewskm](https://github.com/polewskm); replace the Owners today: paragraph with: @polewskm, the one owner of
the NCodeGroup organization and the one admin of this repository; the packages on nuget.org belong to the nuget.org
account NCode; keep the sentence that continuity needs two people and the
silver level can't be claimed until then, with its link.
[ ] 4. Write the security requirements and threat model
Files: docs/assurance-case.md (edit)
Change: Security Requirements: R1 only registered code runs; R2 polymorphic dispatch resolves only registered
services, a response command with no handler fails; R3 failures fail closed; R4 deterministic order; R5 no side
effects or retained data; R6 builds and releases come from reviewed code; then what users must not rely on (no
authorization or validation of its own, a handler that sets handled suppresses any exception, settable DefaultMediatorPriorities, dynamic code paths, main.yml gaps Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25, .NET 8 Move the packages off .NET 8, past its end of support #33). Threat Model: trust boundary (the
host process and its container are trusted; command data is the application's), a Threat/In scope/Countered by
table, out-of-scope items. Delete both prompts.
[ ] 5. Write the design principles and the weaknesses countered
Files: docs/assurance-case.md (edit)
Change: Secure Design Principles Applied: economy of mechanism, fail-safe defaults, complete mediation, least
privilege, open design, each from the facts above. Common Weaknesses Countered: CWE-470, CWE-636 and CWE-755,
CWE-696, CWE-532, CWE-1395, CWE-829, CWE-250, each naming its requirement or control. Delete both prompts.
[ ] 6. Write the evidence and the security reviews
Files: docs/assurance-case.md (edit)
Change: Evidence: delete its prompt, keep its bullets correct, add a Requirements under test bullet naming the
tests behind R2–R4 and say coverage isn't gated, and correct Static analysis, Review and Release
integrity to the facts above (CodeQL languages, required checks, reproducible build, release tags ruleset, no
attestation). Security Reviews: delete its prompt; say no independent security review has been done, and list what
reviews every change (NCode Review, CodeQL, Scorecard, Dependabot, secret scanning).
Change: under ## [Unreleased]'s existing ### Changed, add the entry: - GOVERNANCE.md names the maintainer and the owners, ROADMAP.md lists the plans for the next twelve months, and docs/assurance-case.md states the security requirements, the threat model, the design principles and the weaknesses it counters ([#35](https://github.com/NCodeGroup/Mediator/issues/35)). with each file name in backticks.
Every claim in the three documents matches the code, a workflow, a setting or an issue as gathered above; no claim
of a control the repository doesn't have (attestation, trusted publishing, coverage gate, an outside review).
No [//]: # "Maintainers: ..." prompt is left in the three files, and no other file's prompt was touched.
Every relative link resolves from its file's folder.
Marcin reviews the roadmap's and the threat model's wording.
Autopilot: re-plan note. While writing R4, the plan found that middleware run lowest priority first (CommandHandlerWrapper and CommandResponseHandlerWrapper fold them from the handler outward after a descending sort), the reverse of what the README and the XML documentation say. Changing either is a decision for a maintainer, outside this documentation issue, so it is filed as #38, and the assurance case describes the order as it is and links #38. It also found that the NUGET_APIKEY secret main.yml publishes with isn't stored for this repository; the assurance case says so and links #25.
Activity
polewskm commentedon Nov 29, 2026
Plan snapshot. The working copy is
PLAN.mdin the plan's checkout; this comment is not updated as steps run.Plan: Fill in the roadmap, the maintainers and the assurance case (7 steps)
Plan: Fill in the roadmap, the maintainers and the assurance case
Issue: #35
Goal
ROADMAP.md,GOVERNANCE.mdanddocs/assurance-case.mdstill hold the project template's[//]: # "Maintainers: ..."prompts and placeholders (
Not written yet.,Nothing is ruled out yet.,The repository's owners). Write each sectionfrom evidence that can be checked: GitHub's collaborator and organization lists, the open issues, the decision records,
the code of the two packages and the repository's CI and ruleset settings. Delete each prompt once its section is
written, so the OpenSSF Best Practices silver documents (template ADR-0023) say what the project actually does.
Context for the executor
dotnet builddotnet test./build/dod.ps1 -Fastdocs/assurance-case.mdarerelative to
docs/(decisions/...,../SECURITY.md), links inROADMAP.mdandGOVERNANCE.mdare relative to theroot; issues are linked as
[#33](https://github.com/NCodeGroup/Mediator/issues/33). Follow the shape of the samesections in NCodeGroup/brand's
docs/assurance-case.md(requirements R1..Rn, a threat table with Threat, In scope,Countered by, principles as bold-labelled bullets, CWEs as bullets naming the requirement).
gh api repos/NCodeGroup/Mediator/collaborators: one collaborator,polewskm, roleadmin.gh api orgs/NCodeGroup/members?role=admin:polewskmonly; the organization has no other member.NCode.MediatorandNCode.Mediator.Abstractions1.0.0 are owned by the nuget.org accountNCode(https://www.nuget.org/profiles/NCode), on a verified ID prefix; nuget.org doesn't show that account's members.
Protect main(no bypass actors): no deletion, no force push, pull request with one approval of the lastpush, stale approvals dismissed, every review thread resolved, merge methods merge and rebase; required status
checks
build,build-and-test,test, branch up to date; code scanning rule: CodeQL alerts at errors andwarnings, security alerts of any severity. Ruleset
Protect release tags(refs/tags/v*): no deletion, no update.security updates on.
.github/workflows/ci.yml: top-levelcontents: read, checkouts withpersist-credentials: false, actions pinnedby full commit SHA;
build-and-testruns./build/dod.ps1(decision index, Release build with warnings as errorsand
FailOnNuGetAdvisories, tests, pack);reproducible-buildruns./.template/Test-ReproducibleBuild.ps1(template ADR-0154), not a required check.
Check .NET supportruns with-WarnOnlyuntil Move the packages off .NET 8, past its end of support #33..github/workflows/main.yml(jobsbuild,test,publish):buildandtestare required checks;publishruns only on a published GitHub release, holds
contents: write, uploads the packages to the release and pushesthem to nuget.org with the
NUGET_APIKEYrepository secret. Itsactions/*steps use version tags(
actions/checkout@v7), not commit SHAs; onlydorny/test-reporteris pinned by SHA. Itspublishjob expandsgithub.event.release.tag_nameand the key insiderun:. No build provenance attestation is made. Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25 trackstrusted publishing, retiring its CI and hardening it.
.github/workflows/codeql.yml: CodeQLsecurity-extendedonactionsandcsharpon every pull request, pushto
main, merge group and weekly..github/workflows/scorecard.yml: OpenSSF Scorecard on each push tomainandweekly.
.github/workflows/code-review.yml: NCode Review (NCodeGroup/code-review, pinned by SHA, v1.7.0) runsfrom the default branch through
pull_request_target, reviews each pull request when it opens or is marked readyand on a writer's
/review, never builds or runs the pull request's code, and its approver app's approval meetsthe ruleset's required approval.
.github/dependabot.yml: weekly github-actions, nuget and dotnet-sdk updates, three-day cooldown, securityupdates grouped.
nuget.configclears every source and adds only nuget.org.build/ProjectTemplate.props: warnings as errors,latest-recommendedanalyzers, banned APIs, null-forgivingoperator banned outside tests,
ContinuousIntegrationBuildin CI, Source Link with embedded untracked sources,.snupkgsymbols, package validation againstPackageValidationBaselineVersion1.0.0 (Directory.Build.props)..copier-answers.ymlhascoverage_gate: false: coverage is not measured or gated.NCode.Mediator/,NCode.Mediator.Abstractions/):AddMediator(DefaultRegistration.cs) registers onlythe library's own types, scoped, with
TryAdd; it scans no assembly.DefaultMediator.SendAsyncresolvesICommandHandlerWrapper<TCommand>orICommandResponseHandlerWrapper<TCommand,TResponse>withGetRequiredService;PolymorphicSendAsyncbuilds that type withMakeGenericType(command.GetType())and is[RequiresDynamicCode]. The standard middleware (Middleware/Standard*.cs,[RequiresDynamicCode]) runspre-processors, then
next(), then post-processors; on any exception it notifies the listener wrapper and thehandler wrapper resolved for
exception.GetType(), returns or completes only whenstate.IsHandled, andotherwise
throw;. The exception-handler wrappers stop at the first handler that sets handled. Every pipelinelist is sorted with
OrderByDescending(MediatorPriority)(0 withoutISupportMediatorPriority), a stable sort.The library writes no log, opens no file, socket or process, serializes nothing and keeps no command, response or
exception after the call.
DefaultMediatorPriorities.HighandLoware public static settable properties.not before 2026-11-30T21:24Z), Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25 (decisions left: AssemblyVersion, auto-merge exception, CA1711/CA1716 names,
trusted publishing, retire
main.yml's CI,main.ymlhardening,Directory.Packages.propsownership, changelogbackfill).
docs/best-practices-badge.md: not registered at bestpractices.dev yet. The project has no ADR of itsown (
docs/decisions/holds only0000-template.md), and no document rules a feature out.docs/decisions/project-template/,build/dod.ps1, ...). Leavedocs/architecture.md's,SECURITY.md's anddocs/best-practices-badge.md's own prompts alone: Fill in the roadmap, the maintainers and the assurance case #35 covers onlythe three files.
Decisions
follow-up, maps to no kind; it asks for documentation).admin member, as docs: give every published package a readme and name the maintainers identity#964 and Pin Lucide 1.81.0 and write the Best Practices documents brand#47 did. The nuget.org owner is named as nuget.org shows
it, the
NCodeaccount, since its members aren't public.no ADR or document of this project rules a feature out.
that tracks it (Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25 for
main.yml, Move the packages off .NET 8, past its end of support #33 for .NET 8).two existing tests, so the evidence names a test for each requirement.
Release:line:release: none, and the plan changes only docs and tests; the changelog entry goes under## [Unreleased].Out of scope
NCode.Mediator/orNCode.Mediator.Abstractions/, to workflows or to settings.main.yml, .NET 8): Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25 and Move the packages off .NET 8, past its end of support #33 track them.Steps
[ ] 1. Assert that a throwing pre-processor skips the handler
NCode.Mediator.Tests/Middleware/StandardCommandMiddlewareTests.cs(edit),NCode.Mediator.Tests/Middleware/StandardCommandResponseMiddlewareTests.cs(edit)HandleAsync_WhenPreProcessorThrows_NotifiesListenersAndInvokesHandlers, addvar nextInvoked = false;and pass anextdelegate that sets it (() => { nextInvoked = true; return ...; }),then
Assert.False(nextInvoked);after the existing asserts.listenerInvokedflag in the same test.dotnet test NCode.Mediator.Tests --filter "FullyQualifiedName~WhenPreProcessorThrows" -- RunConfiguration.TreatNoTestsAsError=true; if (-not $? -or $LASTEXITCODE) { exit 1 } else { exit 0 }[ ] 2. Name the maintainer and the owners in GOVERNANCE.md
GOVERNANCE.md(edit)[//]: # "Maintainers: ..."lines; Maintainer row's Who becomes[@polewskm](https://github.com/polewskm); replace theOwners today:paragraph with: @polewskm, the one owner ofthe NCodeGroup organization and the one admin of this repository; the packages on nuget.org belong to the nuget.org
account
NCode; keep the sentence that continuity needs two people and thesilver level can't be claimed until then, with its link.
if ((Select-String -LiteralPath GOVERNANCE.md -Pattern 'Maintainers:' -Quiet) -or -not (Select-String -LiteralPath GOVERNANCE.md -Pattern '\| Maintainer \| \[@polewskm\]' -Quiet) -or -not (Select-String -LiteralPath GOVERNANCE.md -Pattern '^Owners today: \[@polewskm\]' -Quiet)) { exit 1 } else { exit 0 }[ ] 3. Write the roadmap
ROADMAP.md(edit)Publishing (Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25's trusted publishing,
main.ymlhardening and retiring its CI); Decisions left (Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25's otheritems); keep Supply chain, adding Drop NCode Review v1.7.0's cooldown exception #32; OpenSSF Best Practices: register at bestpractices.dev and reach silver.
Not Planned: no decision record or document rules a feature out yet; a request outside the scope starts as an issue,
and a decision that rules one out is recorded in
docs/decisions/and listed here.if ((Select-String -LiteralPath ROADMAP.md -Pattern 'Maintainers:|Nothing is ruled out yet' -Quiet) -or -not ((Select-String -LiteralPath ROADMAP.md -Pattern 'issues/33','issues/32','issues/25' | Select-Object -ExpandProperty Pattern -Unique).Count -eq 3)) { exit 1 } else { exit 0 }[ ] 4. Write the security requirements and threat model
docs/assurance-case.md(edit)services, a response command with no handler fails; R3 failures fail closed; R4 deterministic order; R5 no side
effects or retained data; R6 builds and releases come from reviewed code; then what users must not rely on (no
authorization or validation of its own, a handler that sets handled suppresses any exception, settable
DefaultMediatorPriorities, dynamic code paths,main.ymlgaps Decisions left after the project-template v0.61.2 and NCode Review v1.1.2 upgrade #25, .NET 8 Move the packages off .NET 8, past its end of support #33). Threat Model: trust boundary (thehost process and its container are trusted; command data is the application's), a Threat/In scope/Countered by
table, out-of-scope items. Delete both prompts.
$t = Get-Content -LiteralPath docs/assurance-case.md -Raw; if ($t -match 'Maintainers: (list what|add a table)' -or $t -notmatch '\*\*R6\.\*\*' -or $t -notmatch '\| Threat \| In scope \| Countered by \|') { exit 1 } else { exit 0 }[ ] 5. Write the design principles and the weaknesses countered
docs/assurance-case.md(edit)privilege, open design, each from the facts above. Common Weaknesses Countered: CWE-470, CWE-636 and CWE-755,
CWE-696, CWE-532, CWE-1395, CWE-829, CWE-250, each naming its requirement or control. Delete both prompts.
$t = Get-Content -LiteralPath docs/assurance-case.md -Raw; if ($t -match 'Maintainers: (say how|list the CWE)' -or $t -match 'Not written yet' -or $t -notmatch 'CWE-470' -or $t -notmatch '\*\*Least privilege') { exit 1 } else { exit 0 }[ ] 6. Write the evidence and the security reviews
docs/assurance-case.md(edit)tests behind R2–R4 and say coverage isn't gated, and correct Static analysis, Review and Release
integrity to the facts above (CodeQL languages, required checks, reproducible build, release tags ruleset, no
attestation). Security Reviews: delete its prompt; say no independent security review has been done, and list what
reviews every change (NCode Review, CodeQL, Scorecard, Dependabot, secret scanning).
$t = Get-Content -LiteralPath docs/assurance-case.md -Raw; if ($t -match 'Maintainers:' -or $t -match 'None recorded yet' -or $t -notmatch 'Requirements under test') { exit 1 } else { exit 0 }[ ] 7. Record the change in the changelog
CHANGELOG.md(edit)## [Unreleased]'s existing### Changed, add the entry:- GOVERNANCE.md names the maintainer and the owners, ROADMAP.md lists the plans for the next twelve months, and docs/assurance-case.md states the security requirements, the threat model, the design principles and the weaknesses it counters ([#35](https://github.com/NCodeGroup/Mediator/issues/35)).with each file name in backticks.if (Select-String -LiteralPath CHANGELOG.md -Pattern 'issues/35' -Quiet) { exit 0 } else { exit 1 }Review checklist
of a control the repository doesn't have (attestation, trusted publishing, coverage gate, an outside review).
[//]: # "Maintainers: ..."prompt is left in the three files, and no other file's prompt was touched.polewskm commentedon Nov 29, 2026
Autopilot: re-plan note. While writing R4, the plan found that middleware run lowest priority first (
CommandHandlerWrapperandCommandResponseHandlerWrapperfold them from the handler outward after a descending sort), the reverse of what the README and the XML documentation say. Changing either is a decision for a maintainer, outside this documentation issue, so it is filed as #38, and the assurance case describes the order as it is and links #38. It also found that theNUGET_APIKEYsecretmain.ymlpublishes with isn't stored for this repository; the assurance case says so and links #25.