Skip to content

Commit

Permalink
Refactored repository structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jharper-sec committed Dec 6, 2024
1 parent ae65288 commit 8fa1623
Show file tree
Hide file tree
Showing 23 changed files with 1,296 additions and 99 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,61 +21,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Create Jekyll structure
run: |
mkdir -p _runbooks
# Create config file
cat > _config.yml << 'EOL'
title: Contrast Security ADR Runbooks
baseurl: "/adr-runbooks"
url: "https://contrast-security-oss.github.io"
markdown: GFM
collections:
runbooks:
output: true
permalink: /runbooks/:name/
defaults:
- scope:
path: ""
type: runbooks
values:
layout: default
EOL
# Process each runbook
for file in runbooks/*.md; do
if [ -f "$file" ] && [ "$(basename "$file")" != "README.md" ]; then
filename=$(basename "$file" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g' | sed 's/runbook\.md$/md/')
# Start with YAML front matter
{
echo "---"
echo "layout: default"
echo "title: $(basename "$file" | sed 's/RunBook.md//')"
echo "---"
echo
# Add extra newline before each heading
sed 's/^#/\n#/' "$file" | \
# Replace single backslash at end of line with two spaces
sed 's/\\$/ /' | \
# Add newline after code blocks
sed 's/`/`\n/g' | \
# Ensure blank line after bullet points
sed 's/^-/\n-/' | \
# Remove HTML comments
sed 's/<!--.*-->//g' | \
# Remove empty lines but preserve spacing
sed '/^[[:space:]]*$/d'
} > "_runbooks/$filename"
fi
done
- name: Setup Pages
uses: actions/configure-pages@v4

Expand Down
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,59 @@
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/

# Used by dotenv library to load environment variables.
# .env

# Ignore Byebug command history file.
.byebug_history

## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/

## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# vendor/Pods/

## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/

## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/

# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset

# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc

# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*

# Mac
.DS_Store
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Contributing to ADR Runbooks

Thank you for your interest in contributing to Contrast Security's Application Detection and Response Runbooks. This document provides guidelines for contributions.

## How to Contribute

1. Fork the repository
2. Create a new branch for your changes
3. Make your changes
4. Submit a pull request

## Runbook Structure

Each runbook should follow this structure:

```markdown
---
layout: runbook
title: "Title of the Runbook"
description: "Brief description of the security issue and its impact"
---

# Title

Brief introduction explaining the security issue.

## Example Events

Include example events showing different outcomes (Exploited, Blocked, etc).

## Decision Tree

Clear steps for triaging the event type.

## Response Procedures

Detailed procedures based on event outcome.

## Post-Incident Activities

Steps for documentation and follow-up.
```

## Style Guidelines

- Use clear, concise language
- Include relevant code examples
- Add decision trees for complex procedures
- Include example events where applicable
- Document post-incident procedures

## Review Process

1. All contributions will be reviewed for:
- Technical accuracy
- Adherence to style guidelines
- Clarity and completeness
- Formatting consistency

2. Make requested changes if any are needed

3. Once approved, changes will be merged

## Code of Conduct

Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'

gem 'github-pages', group: :jekyll_plugins
gem 'jekyll-remote-theme'
gem 'jekyll-seo-tag'
gem 'kramdown'
gem 'rouge'
Loading

0 comments on commit 8fa1623

Please sign in to comment.