Skip to content
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
62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Bug report
description: Something in nodkey does not work as the docs say.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
**This repository is public.** Before you paste anything, remove every
token, key, secret, host name, domain name and IP address. Use
`laptop`, `web-1`, `example.com` or `192.0.2.1` instead.

A security problem is not a bug report: report it privately, as
[SECURITY.md](https://github.com/code6x/nodkey/blob/main/SECURITY.md) says.
- type: input
id: version
attributes:
label: nodkey version
description: The output of `nodkey version`.
placeholder: nodkey 0.1.0
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: The OS and its version, for example `Debian 13` or `macOS 15`.
validations:
required: true
- type: dropdown
id: side
attributes:
label: Where does it happen?
options:
- broker
- client
- both
- I do not know
validations:
required: true
- type: textarea
id: happened
attributes:
label: What happened
description: The command you ran and what it did.
validations:
required: true
- type: textarea
id: expected
attributes:
label: What you expected
validations:
required: true
- type: textarea
id: logs
attributes:
label: Log lines
description: |
The error, and the journal lines if you have them: on the broker,
`journalctl -u nodkey`; for `nodkey ssh-agent`,
`journalctl --user -u nodkey-ssh-agent`. Remove tokens, keys, host
names and addresses first.
render: text
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Report a security problem
url: https://github.com/code6x/nodkey/security/advisories/new
about: Please report a security problem privately, not in a public issue.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Feature request
description: An idea to make nodkey better.
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
**This repository is public.** Do not paste tokens, keys, host names
or addresses.
- type: textarea
id: problem
attributes:
label: The problem
description: What is hard or not possible today, and when does it happen?
validations:
required: true
- type: textarea
id: idea
attributes:
label: The idea
description: How could nodkey solve it? Say what it changes in DESIGN.md or THREAT-MODEL.md, if you know.
validations:
required: true
- type: textarea
id: done-when
attributes:
label: Done when
description: The checks that show the work is done. The issue closes when every box has evidence.
value: |
- [ ]
validations:
required: true
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Closes #

<!-- What changes, and why. -->

## Checklist

- [ ] The title follows [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:` ...).
- [ ] Tests cover the deny paths, not only the happy path.
- [ ] The docs are updated: DESIGN.md and THREAT-MODEL.md if a message, a check or the path of a value changes; `docs/` if a command or the config changes.
- [ ] The security review is done ([AGENTS.md](https://github.com/code6x/nodkey/blob/main/AGENTS.md#rules)).
- [ ] No private data: no real host name, address, token, key or private name.
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ Planned. Each v1 issue adds its part.
`test/e2e/testdata/sshd`.
- `.claude/agents/security-reviewer.md` - the security review every change
gets.
- `CONTRIBUTING.md` - the guide for contributors. It points to this file,
`SECURITY.md` and `docs/releasing.md`; it does not copy them.
- `CODE_OF_CONDUCT.md` - the Contributor Covenant 2.1, with the contact
for a report.
- `.github/ISSUE_TEMPLATE/` - the issue forms (bug report, feature request)
and `config.yml`, with the link to the private security report.
- `.github/pull_request_template.md` - the checklist of a pull request.

## Commands

Expand Down
83 changes: 83 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# 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, caste, color, 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 [INSERT CONTACT METHOD]. 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.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Contributing to nodkey

Thank you for your help. nodkey is a security tool, so the rules for a
change are strict. This page says what they are and where to read more.

Please read these first. They are the rules the code must follow:

- [AGENTS.md](AGENTS.md): the layout of the code, the commands, and the
rules for every change. They apply to people and to AI agents alike.
- [DESIGN.md](DESIGN.md): how nodkey works.
- [THREAT-MODEL.md](THREAT-MODEL.md): what nodkey promises, and what it
does not.

Everyone who takes part follows the
[code of conduct](CODE_OF_CONDUCT.md).

## Report a bug or ask for a feature

Open an [issue](https://github.com/code6x/nodkey/issues/new/choose) and
choose a form. Before work starts, an issue gets a **"Done when"** list:
the checks that show the work is done. The issue closes when every box
has evidence.

Before you paste a log or a config, remove every token, key, host name
and address from it.

## Report a security problem

Do **not** open a public issue. Report it privately, as
[SECURITY.md](SECURITY.md) says.

## Build and test

You need Go 1.26 or newer. The commands are in
[AGENTS.md](AGENTS.md#commands):

```sh
go test -race ./...
go vet ./...
golangci-lint run --build-tags e2e
```

The end-to-end test runs `sshd` in a container. It needs Docker, `ssh`
and `git` ([DESIGN.md section 17](DESIGN.md#17-testing)):

```sh
go test -race -tags e2e ./test/e2e/...
```

## Make a pull request

- **One issue gives one pull request**, on its own branch. Say which
issue it closes.
- **The title follows [Conventional Commits](https://www.conventionalcommits.org/)**,
for example `fix: deny an empty key name`. The allowed types are in
[docs/releasing.md](docs/releasing.md#pull-request-titles). Pull
requests are squash merged, so the title becomes the commit message.
- **Tests cover the deny paths too**, not only the happy path. nodkey
fails closed: every error, timeout or unclear case means deny.
- **The docs change in the same pull request.** If a change alters what a
message shows, what the broker checks, or where a value goes, update
DESIGN.md and THREAT-MODEL.md. If it changes the config, a command or a
line that a guide in `docs/` shows, update that guide too.
- **Dependencies** are few, and the list is in
[AGENTS.md](AGENTS.md#rules). Anything else needs a reason in the pull
request.
- **No private data.** This repository is public. Never add a real host
name, domain name, IP address, MAC address, token, key, serial number,
or private name. Use `laptop`, `web-1`, `example.com` and addresses
from `192.0.2.0/24`.
- **Plain English** in docs and messages, with short sentences. Many
readers are not native speakers. Dates are absolute (`2026-10-12`).
- **Every change gets a security review** before it is merged
([AGENTS.md](AGENTS.md#rules)).

## License of a contribution

nodkey is under the [Apache License 2.0](LICENSE). By section 5 of the
license, what you send in a pull request is under the same license. There
is no contributor license agreement (CLA) to sign.
Loading