microsoft/hve-core

Public

mirrored fromhttps://github.com/microsoft/hve-coreAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
68b04bc3b47266718f1570cf7f2cb7908467f8d4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

docs/contributing/copyright-headers.md

75lines · modecode

1---
2title: Copyright Header Guidelines
3description: Standards for copyright and license headers in source files to meet OpenSSF Best Practices badge criteria
4sidebar_position: 7
5author: Microsoft
6ms.date: 2026-01-31
7ms.topic: reference
8keywords:
9 - copyright
10 - license
11 - SPDX
12 - headers
13 - OpenSSF
14estimated_reading_time: 2
15---
16
17This document defines the copyright and license header format required for source files in the hve-core repository. Following these guidelines ensures compliance with [OpenSSF Best Practices](https://www.bestpractices.dev/en/criteria/2) Gold badge criteria for `copyright_per_file` and `license_per_file`.
18
19## Overview
20
21All source files in this repository must include a copyright and license header. We use the [SPDX License Identifier](https://spdx.org/licenses/) standard to provide machine-readable license information.
22
23## Header Format
24
25### PowerShell Files
26
27```text
28# Copyright (c) Microsoft Corporation.
29# SPDX-License-Identifier: MIT
30```
31
32Applies to: `.ps1` files
33
34## Placement Rules
35
36The header placement depends on any required directives in the file:
37
38### With #Requires Statements
39
40Place the header **after** any `#Requires` statements:
41
42```powershell
43#Requires -Version 7.0
44#Requires -Modules @{ ModuleName="Pester"; ModuleVersion="5.0" }
45# Copyright (c) Microsoft Corporation.
46# SPDX-License-Identifier: MIT
47
48# Script content starts here
49```
50
51### Without #Requires Statements
52
53If no `#Requires` statements exist, place the header at the first line:
54
55```powershell
56# Copyright (c) Microsoft Corporation.
57# SPDX-License-Identifier: MIT
58
59param(
60 [string]$Path
61)
62```
63
64## References
65
66* [Microsoft Open Source](https://opensource.microsoft.com/) - Microsoft's open source program and governance
67* [SPDX License List](https://spdx.org/licenses/) - Standard license identifiers
68* [SPDX License Identifier Specification](https://spdx.github.io/spdx-spec/v2.3/using-SPDX-short-identifiers-in-source-files/) - How to use SPDX identifiers in source files
69* [OpenSSF Best Practices Badge Criteria](https://www.bestpractices.dev/en/criteria/2) - Gold level requirements
70* [PowerShell/PowerShell header example](https://github.com/PowerShell/PowerShell/blob/master/tools/Sign-Package.ps1) - Reference implementation
71
72---
73
74*🤖 Crafted with precision by ✨Copilot following brilliant human instruction,
75then carefully refined by our team of discerning human reviewers.*
76