Skip to content

Latest commit

 

History

History
96 lines (68 loc) · 2.76 KB

File metadata and controls

96 lines (68 loc) · 2.76 KB
title Copyright Header Guidelines
description Standards for copyright and license headers in source files to meet OpenSSF Best Practices badge criteria
sidebar_position 7
author Microsoft
ms.date 2026-01-31
ms.topic reference
keywords
copyright
license
SPDX
headers
OpenSSF
estimated_reading_time 2

This 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 Gold badge criteria for copyright_per_file and license_per_file.

Overview

All source files in this repository must include a copyright and license header. We use the SPDX License Identifier standard to provide machine-readable license information.

Header Format

PowerShell Files

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT

Applies to: .ps1 files

Python Files

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT

Applies to: .py files

Placement Rules

The header placement depends on any required directives in the file:

With #Requires Statements

Place the header after any #Requires statements:

#Requires -Version 7.0
#Requires -Modules @{ ModuleName="Pester"; ModuleVersion="5.0" }
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT

# Script content starts here

Without #Requires Statements

If no #Requires statements exist, place the header at the first line:

# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT

param(
    [string]$Path
)

Python Files

Place the header after any shebang line and before PEP 723 inline metadata or the module docstring:

#!/usr/bin/env python3
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT

If no shebang exists, place the header at the first line.

References


🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.