Skip to content
Closed
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
11 changes: 11 additions & 0 deletions .devcontainer/scripts /codeql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

CODEQL_PATH=/home/root/.vscode-remote/data/User/globalStorage/github.vscode-codeql/distribution1/codeql/codeql

if [ ! -f $CODEQL_PATH ]; then
echo "CodeQL not found. Please install the CodeQL extension in VSCode and try again."
exit 1
fi

$CODEQL_PATH $@
28 changes: 28 additions & 0 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Webpack

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npx webpack
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
agencylevelup2025@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing to gh-secure

Thank you for your interest in contributing to this project! We welcome contributions of all kinds: bug reports, feature requests, documentation improvements, and code changes.

## Getting Started

1. Fork the repository and clone your fork locally.
2. Ensure you have the [GitHub CLI](https://cli.github.com) (`gh`) installed and authenticated.
3. The extension is a single Bash script (`gh-secure`), so no build step is required.

## Making Changes

1. Create a new branch for your changes: `git checkout -b my-feature`
2. Make your changes and test them locally by running `./gh-secure` from the repo root.
3. Ensure your changes work with both `--yes` and interactive (step-by-step) modes.
4. Test with `--dry-run` to verify no unintended side effects.
5. Commit your changes with clear, descriptive commit messages.
6. Push to your fork and open a Pull Request against the `main` branch.

## Coding Conventions

- Follow [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) conventions.
- Use meaningful variable names and add comments for non-obvious logic.
- Keep functions focused and well-named.
- Test edge cases (missing permissions, private repos, already-enabled features).

## Reporting Bugs

**Please do NOT open a public GitHub issue for security vulnerabilities.** Instead, please follow the instructions in [SECURITY.md](./SECURITY.md).

For all other bugs, please open an issue on GitHub with:
- A clear description of the problem.
- Steps to reproduce the issue.
- Expected vs. actual behavior.
- Environment details (OS, `gh` version, shell).

## Suggesting Features

Open an issue describing:
- The use case or problem you'd like to solve.
- Your proposed approach (if you have one).
- Any alternatives you've considered.

## Code of Conduct

This project follows the [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
74 changes: 74 additions & 0 deletions SECURITY.md.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Security Policy Template

This is a template SECURITY.md file you can add to your repository after enabling security features.

---

# Security Policy

## Reporting a Vulnerability

We take the security of this project seriously. If you discover a security vulnerability, please report it responsibly.

### How to Report

**For security vulnerabilities, please DO NOT open a public issue.**

Instead, please report security vulnerabilities through one of the following methods:

1. **Private Vulnerability Reporting** (Recommended)
- Go to the [Security Advisories](../../security/advisories) page
- Click "Report a vulnerability"
- Provide detailed information about the vulnerability

2. **Email**
- Send details to: [your-security-email@example.com]
- Include "SECURITY" in the subject line

### What to Include

Please include the following information in your report:
- Description of the vulnerability
- Steps to reproduce the issue
- Potential impact
- Suggested fix (if you have one)

### Response Timeline

- We will acknowledge receipt of your report within 48 hours
- We will provide a detailed response within 7 days
- We will keep you informed of our progress
- We will credit you in the fix announcement (unless you prefer to remain anonymous)

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| latest | ✅ Yes |
| older | ❌ No |

## Security Features

This repository has the following security features enabled:

- ✅ Branch Protection
- ✅ Private Vulnerability Reporting
- ✅ Secret Scanning with Push Protection
- ✅ Dependabot Security Updates
- ✅ Code Scanning (CodeQL) including Actions workflow security

## Security Best Practices

When contributing to this project:
- Never commit secrets (API keys, passwords, tokens)
- Keep dependencies up to date
- Follow secure coding practices
- Review Dependabot alerts and PRs promptly

## Questions?

If you have questions about this security policy, please open a discussion or contact the maintainers.

---

Thank you for helping keep this project secure! 🔒
31 changes: 31 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Support

## How to Get Help

If you need help with this project, here are your options:

### Documentation

- Read the [README.md](./README.md) for installation, usage, and FAQ.
- Check the [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and coding conventions.

### Issues

- Search [existing issues](../../issues) to see if your question has already been answered.
- If not, open a new issue with a clear description of your problem or question.

### Scope of Support

This project is maintained by the GitHub Security Lab team on a best-effort basis. We will do our best to respond to issues and pull requests in a timely manner, but cannot guarantee specific response times.

### What We Can Help With

- Bug reports and reproducible issues.
- Questions about which security features are enabled and how.
- Guidance on contributing new features or improvements.

### What Is Out of Scope

- General GitHub security feature questions (please refer to [GitHub Security Documentation](https://docs.github.com/en/code-security)).
- Issues with the GitHub CLI itself (please refer to [cli/cli](https://github.com/cli/cli)).
- Organization-level policy or permissions issues unrelated to this tool.
Loading
Loading