microsoft/hve-core

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
17a85daf2f170d57880c18936fe38b190d2f5b2e

Branches

Tags

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

Clone

HTTPS

Download ZIP

docs/contributing/copyright-headers.md

74lines · modecode

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