Skip to content
This repository was archived by the owner on Dec 24, 2025. It is now read-only.
Draft
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
60 changes: 60 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# PowerShell
*.ps1xml
*_profile.ps1

# Staging and temporary directories
StigPrep/
C:\StigPrep/

# Log files
*.log
*.txt.log
*.err
*.error

# Backup files
*.bak
*.backup
*.old

# Windows artifacts
Thumbs.db
Desktop.ini
$RECYCLE.BIN/

# PowerShell module cache
PSGetModuleInfo.xml

# Credential files
*.credential
*.cred
*password*
*secret*

# Archived files (consider removing from repo)
*.zip
*.7z
*.rar

# Build artifacts
bin/
obj/
out/

# IDE and Editor files
.vscode/
.vs/
*.suo
*.user
*.userosscache
*.sln.docstates

# Mac files
.DS_Store
.AppleDouble
.LSOverride

# Temporary files
*.tmp
*.temp
~$*
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Comprehensive README.md with usage instructions and prerequisites
- CONTRIBUTING.md with contribution guidelines
- SECURITY.md with security policy and vulnerability reporting
- CODE_OF_CONDUCT.md for community standards
- CHANGELOG.md for tracking version history
- .gitignore for PowerShell and Windows artifacts
- .editorconfig for consistent code formatting
- GitHub Actions workflow for PowerShell linting
- GitHub issue templates for bugs and feature requests
- GitHub pull request template

### Changed
- Renamed `set_tls..ps1` to `set_tls.ps1` (fixed double dots typo)

### Fixed
- Repository structure documentation
- File naming consistency

## [1.0.0] - 2022-10-25

### Added
- Windows Server 2019 STIG configuration script (Win2019-STIG.ps1)
- IIS 10.0 Server STIG script v2.5
- IIS 10.0 Site STIG script v2.5
- TLS/SSL security configuration script
- Modular PowerShell modules for various applications:
- Adobe Reader
- Chrome
- Defender
- DotNet
- Edge
- Firefox
- Firewall
- IE11
- IIS Server and Site
- Office 2016 and 2019
- Excel, PowerPoint, Word
- STIG evaluation answer files for IL4
- Support for multiple STIG categories

### Initial Release Notes
- Based on DISA STIG guidance
- IIS 10.0 STIG Version 2, Release 5 (27 Jan 2022)
- Supports Windows Server 2019 and compatible versions
- MIT License

[Unreleased]: https://github.com/bgauger/Compliance_as_Code/compare/v1.0.0...HEAD
[1.0.0]: https://github.com/bgauger/Compliance_as_Code/releases/tag/v1.0.0
170 changes: 170 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Contributing to Compliance as Code

Thank you for your interest in contributing to the Compliance as Code project! This document provides guidelines for contributing to this repository.

## How to Contribute

### Reporting Issues

If you find a bug or have a suggestion for improvement:

1. Check the [Issues](https://github.com/bgauger/Compliance_as_Code/issues) to see if it has already been reported
2. If not, create a new issue with:
- Clear title and description
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- System information (Windows version, PowerShell version)
- STIG version being targeted

### Submitting Changes

1. **Fork the repository** and create a new branch for your changes
```powershell
git checkout -b feature/your-feature-name
```

2. **Make your changes** following the coding guidelines below

3. **Test your changes** thoroughly in a test environment

4. **Commit your changes** with clear, descriptive commit messages
```powershell
git commit -m "Add feature: description of what you added"
```

5. **Push to your fork** and submit a pull request
```powershell
git push origin feature/your-feature-name
```

## Coding Guidelines

### PowerShell Style

- Use **PascalCase** for function names: `Get-StigConfiguration`
- Use **camelCase** for variable names: `$stagingPath`
- Use **verb-noun** naming convention for functions
- Include **comment-based help** for all functions and scripts
- Use **4 spaces** for indentation (not tabs)
- Keep lines under **120 characters** when possible

### Script Structure

1. **Header comment block** with:
- Synopsis
- Description
- Parameters
- Examples
- Notes (author, version history)

2. **Parameters section** with validation

3. **Functions** before main script logic

4. **Main script logic** with proper error handling

### Example Format

```powershell
<#
.SYNOPSIS
Brief description of the script

.DESCRIPTION
Detailed description of what the script does

.PARAMETER ParameterName
Description of the parameter

.EXAMPLE
.\Script-Name.ps1 -ParameterName "Value"

.NOTES
Author: Your Name
Date: YYYY-MM-DD
Version: 1.0
#>

[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$ParameterName
)

function Verb-Noun {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$Parameter
)

# Function logic here
}

# Main script logic
try {
# Your code here
}
catch {
Write-Error "Error message: $_"
exit 1
}
```

## Testing

- **Test in a non-production environment** before submitting
- Verify scripts run without errors on target systems
- Check that STIG requirements are properly implemented
- Validate that scripts are idempotent (can be run multiple times safely)
- Test both success and failure scenarios

## Documentation

- Update **README.md** if adding new features or scripts
- Document all **parameters** and their acceptable values
- Provide **usage examples** for new scripts
- Update **CHANGELOG.md** with your changes
- Include **inline comments** for complex logic

## STIG Compliance

- Reference the **specific STIG version** being implemented
- Include **STIG IDs** (e.g., V-93345) in comments where applicable
- Verify against the **official STIG documentation**
- Document any **deviations** or **non-applicable** items

## Security Considerations

- **Never commit credentials** or sensitive information
- Ensure scripts follow **principle of least privilege**
- Validate all **user inputs**
- Use **secure coding practices**
- Consider **audit logging** for configuration changes

## Pull Request Process

1. Ensure your code follows the coding guidelines
2. Update documentation as needed
3. Add a clear description of changes in the PR
4. Reference any related issues
5. Wait for review and address any feedback
6. Once approved, your PR will be merged

## Code of Conduct

Please note that this project follows a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.

## Questions?

If you have questions about contributing, please:
- Open an issue for discussion
- Contact the maintainer: [email protected]

## License

By contributing, you agree that your contributions will be licensed under the MIT License.

---

Thank you for helping improve Compliance as Code!
Loading