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
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ These items are essential and must be completed for each commit. If they are not
- [ ] I have run the `dotnet-format` command and fixed any .editorconfig issues
- [ ] I have ensured that the code coverage has not dropped below 65%
- [ ] I have increased the version number in OwaspHeaders.Core.csproj (only relevant for code changes)
- [ ] I have updated the changelog in the root of the repository

> [!NOTE]
> The changelog in the `docs/` directory will be updated automatically when PRs are merged into main.

#### Optional

Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/sync-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Sync Changelog to Docs

on:
push:
branches: [ main ]
paths:
- 'changelog.md'
workflow_dispatch: # Allow manual triggering

permissions:
contents: write

jobs:
sync-changelog:
runs-on: ubuntu-latest
name: Sync root changelog to docs changelog

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Sync changelog files
run: |
# Check if root changelog exists
if [ ! -f "changelog.md" ]; then
echo "Root changelog.md not found, skipping sync"
exit 0
fi

# Create docs directory if it doesn't exist
mkdir -p docs

# Preserve Jekyll front matter and sync content
cat > docs/changelog.md << 'EOF'
---
title: Changelog
layout: page
nav_order: 9
---

EOF

# Append the content from root changelog (skip the first line which is the title)
tail -n +2 changelog.md >> docs/changelog.md

echo "Changelog sync completed"

- name: Check for changes
id: verify-changed-files
run: |
if [ -n "$(git status --porcelain docs/changelog.md)" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "Docs changelog has changes to commit"
else
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes detected in docs changelog"
fi

- name: Commit changes
if: steps.verify-changed-files.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/changelog.md
git commit -m "docs: sync changelog from root to docs directory [skip ci]" -m "Automatically synced changelog.md to docs/changelog.md to keep documentation site up-to-date."
git push
18 changes: 18 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ This version dropped support for .NET 6 and .NET 7, as they are no longer suppor

All projects in the [GitHub repo](https://github.com/GaProgMan/OwaspHeaders.Core) now build and run with either .NET 8 or .NET 9, whichever is present (deferring to the highest version number if both are present). As of November 19th, 2024 there are no new features in Version 9, so if you still need to use the NuGet package with .NET 6 or 7 please use Version 8 of the package.

#### Version 9.8.x

This version introduces comprehensive logging support via the `ILogger<SecureHeadersMiddleware>` interface, following Andrew Lock's high-performance logging best practices. The logging functionality provides visibility into middleware operations, helping developers troubleshoot configuration issues and monitor security header application.

**New Features:**

- Information-level logs for successful operations (middleware initialisation, headers added)
- Warning logs for configuration issues and header operation failures
- Error logs for validation failures and middleware exceptions
- Debug logs for detailed header addition information
- Configurable Event IDs (1000-3999 range) to avoid conflicts with application logging
- High-performance logging with log level checking to minimise performance impact
- 100% backward compatibility - existing applications continue to work without changes

The logging is automatically enabled when an `ILogger<SecureHeadersMiddleware>` is available in dependency injection. Developers can customise Event IDs using `WithLoggingEventIdBase()` or `WithLoggingEventIds()` methods to avoid conflicts with existing application Event ID schemes.

See the [Logging documentation](https://gaprogman.github.io/OwaspHeaders.Core/logging) for detailed configuration options and examples.

#### Version 9.7.x

This version saw the addition of both the [Cross-Origin-Opener-Policy](https://gaprogman.github.io/OwaspHeaders.Core/configuration/Cross-Origin-Opener-Policy/) (COEP) and [Cross-Origin-Embedder-Policy](https://gaprogman.github.io/OwaspHeaders.Core/configuration/Cross-Origin-Embedder-Policy/) (COEP) headers; bringing the total number of supported headers to 83% complete (or 10 of the 12 recommended headers and values).
Expand Down
24 changes: 24 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Changelog
layout: page
nav_order: 9
---

# Changelog

This changelog represents all the major (i.e. breaking) changes made to the OwaspHeaders.Core project since it's inception. Early in the repo's development, GitHub's "releases" where used to release builds of the code repo. However shortly after it's inception, builds and releases where moved to [AppVeyor](https://ci.appveyor.com/project/GaProgMan/owaspheaders-core). Because of this, the releases on the GitHub repo became stale.
Expand All @@ -22,6 +28,24 @@ This version dropped support for .NET 6 and .NET 7, as they are no longer suppor

All projects in the [GitHub repo](https://github.com/GaProgMan/OwaspHeaders.Core) now build and run with either .NET 8 or .NET 9, whichever is present (deferring to the highest version number if both are present). As of November 19th, 2024 there are no new features in Version 9, so if you still need to use the NuGet package with .NET 6 or 7 please use Version 8 of the package.

#### Version 9.8.x

This version introduces comprehensive logging support via the `ILogger<SecureHeadersMiddleware>` interface, following Andrew Lock's high-performance logging best practices. The logging functionality provides visibility into middleware operations, helping developers troubleshoot configuration issues and monitor security header application.

**New Features:**

- Information-level logs for successful operations (middleware initialisation, headers added)
- Warning logs for configuration issues and header operation failures
- Error logs for validation failures and middleware exceptions
- Debug logs for detailed header addition information
- Configurable Event IDs (1000-3999 range) to avoid conflicts with application logging
- High-performance logging with log level checking to minimise performance impact
- 100% backward compatibility - existing applications continue to work without changes

The logging is automatically enabled when an `ILogger<SecureHeadersMiddleware>` is available in dependency injection. Developers can customise Event IDs using `WithLoggingEventIdBase()` or `WithLoggingEventIds()` methods to avoid conflicts with existing application Event ID schemes.

See the [Logging documentation](https://gaprogman.github.io/OwaspHeaders.Core/logging) for detailed configuration options and examples.

#### Verison 9.7.x

This version saw the addition of both the [Cross-Origin-Opener-Policy](https://gaprogman.github.io/OwaspHeaders.Core/configuration/Cross-Origin-Opener-Policy/) (COOP) and [Cross-Origin-Embedder-Policy](https://gaprogman.github.io/OwaspHeaders.Core/configuration/Cross-Origin-Embedder-Policy/) (COEP) headers; bringing the total number of supported headers to 83% complete (or 10 of the 12 recommended headers and values).
Expand Down
2 changes: 1 addition & 1 deletion src/OwaspHeaders.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- NuGet metadata -->
<PackageId>OwaspHeaders.Core</PackageId>
<Version>9.8.0</Version>
<Version>9.8.1</Version>
<Authors>Jamie Taylor</Authors>
<Company>RJJ Software Ltd</Company>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<Description>A Unit Test project (using xunit) for the OwaspHeaders.Core project</Description>
<VersionPrefix>9.8.0</VersionPrefix>
<VersionPrefix>9.8.1</VersionPrefix>
<Authors>Jamie Taylor</Authors>
<AssemblyName>OwaspHeaders.Core.Tests</AssemblyName>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
Expand Down