Contributing Guide
Relevant source files
The following files were used as context for generating this wiki page:Welcome to the CyberPath contribution guide. This document provides all the necessary information for you to contribute to the project, which is dedicated to empowering individuals and organizations in their cybersecurity journey by providing accessible resources and tools. We welcome contributions from everyone to help build a better resource for the cybersecurity community.
The primary ways to contribute are by adding new certifications, training programs, and resources to the public database. This guide will walk you through setting up your local environment, the contribution workflow, and how to add new content. Please adhere to our Code of Conduct in all interactions.
Sources: README.md:3-6, README.md:41-42, CONTRIBUTING.md:3-5, CONTRIBUTING.md:28-29
Getting Started: Local Setup
Before you can contribute, you need to set up the project on your local machine. Although using the official website is recommended for general use, a local setup is required for development and contributions.
Sources: README.md:21-25
1. Fork and Clone
First, fork the repository on GitHub to your own account. Then, clone your forked repository to your local machine.
git clone https://github.com/YOUR_USERNAME/cyberpath.git
cd cyberpath
Sources: CONTRIBUTING.md:9, README.md:28-31
2. Install Dependencies
The project uses pnpm for package management. Install the necessary dependencies by running:
pnpm install
Sources: README.md:32-35
3. Run the Development Server
Once the dependencies are installed, you can start the local development server:
pnpm run dev
The application will be accessible at http://localhost:4321.
Sources: README.md:39-43, package.json:5
Project Scripts
The package.json file defines several scripts for development and building the project.
| Script | Description |
|---|---|
dev | Starts the Astro development server. |
start | An alias for the dev script. |
build | Runs astro check, builds the static site, and runs a script to take a screenshot for promotional use. |
Sources: package.json:4-7
Contribution Workflow
We follow a standard GitHub flow for contributions. All changes are proposed through Pull Requests.
The diagram below illustrates the standard contribution workflow.
This flowchart shows the steps from forking the repository to getting your changes merged.
Sources: CONTRIBUTING.md:8-25
After you open a pull request, maintainers will review your contribution. You may be asked to make adjustments based on feedback before your changes are merged.
Sources: CONTRIBUTING.md:32-34
Adding New Content
A major way to contribute is by adding new cybersecurity certifications to the database. The content is managed through Markdown files within the src/content/certifications directory.
Certification Data Structure
Each certification is defined in a .md or .mdx file and must include a frontmatter section that adheres to a specific schema. This schema is defined using Zod in the project's content configuration.
The diagram below shows the entity relationship for the certifications collection.
This diagram outlines the fields required for each certification entry.
Sources: src/content.config.ts:7-20
Schema Fields
The table below details each field in the certifications schema.
| Field | Type | Description |
|---|---|---|
title | string | The full title of the certification. |
acronym | string | The acronym for the certification (e.g., "CISSP"). |
last_updated_at | date | The date when the certification information was last updated. |
image | image() (Astro) | An optimized image for the certification. |
reference | string | A URL to the official certification page. |
aliases | string[] | (Optional) An array of alternative names or acronyms. |
draft | boolean | (Optional) Set to true to mark the entry as a draft. Defaults to false. |
career_paths | enum[] | An array of associated career paths from a predefined list. |
price | string | The price of the certification exam or materials. |
currency | string | The currency for the price (e.g., "USD"). |
Sources: src/content.config.ts:10-19
Example certifications Schema
Here is the code snippet that defines the collection schema. When adding a new certification, ensure your frontmatter matches this structure.
// src/content.config.ts
const certifications = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: "./src/content/certifications" }),
schema: ({image}) =>
z.object({
title: z.string(),
acronym: z.string(),
last_updated_at: z.date(),
image: image(),
reference: z.string(),
aliases: z.array(z.string()).optional(),
draft: z.boolean().default(false),
career_paths: z.array(z.enum(CareerPathsList)),
price: z.string(),
currency: z.string(),
}),
});
Sources: src/content.config.ts:7-20
Career Paths
The career_paths field must contain values from the CareerPathsList. This list ensures consistency across all entries.
Available career paths include:
- Blue Team Specialist
- Cloud Security Specialist
- Cybersecurity Manager
- Malware Developer
- OSINT Specialist
- Penetration Tester
- Red Team Specialist
- Risk Management Specialist
- Security Operations Specialist
- Threat Hunter
Sources: src/lib/career-paths.ts:18-28
License and Usage
The CyberPath project is licensed under a custom license, not the MIT License mentioned in the README.md. It is crucial to understand the terms before contributing.
Key terms from the license include:
- The work is granted for private use only.
- Commercial use is expressly prohibited without written permission from the licensor, Emanuele Balsamo.
- Redistribution, distribution, or sublicensing of the work or derivative works is prohibited without prior written authorization.
- Rebranding the work is strictly prohibited.
By contributing, you agree that your contributions will be subject to these terms.
Sources: LICENSE.md:1-41, README.md:44-45
Summary
Thank you for considering contributing to CyberPath. Your efforts in adding and updating certifications and resources are vital for building a comprehensive and accessible platform for the cybersecurity community. By following this guide, you can help us ensure a smooth and effective collaboration.
Sources: CONTRIBUTING.md:39-41, README.md:3-6