From 92b9394d094ab96ed6ca22cc53ec043aad27b994 Mon Sep 17 00:00:00 2001 From: Geno Roupsky <185580+groupsky@users.noreply.github.com> Date: Mon, 9 Nov 2026 12:21:31 +0200 Subject: [PATCH 1/4] docs: add a contributing guide --- CONTRIBUTING.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ee4941d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# 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. Every issue has 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)): + +```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:** only the standard library, `golang.org/x/crypto` and + `github.com/BurntSushi/toml`. Anything else needs a reason in the pull + request ([AGENTS.md](AGENTS.md#rules)). +- **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. From c5ceb3bf1d2a44aca942bec0da45f9eb88a11faf Mon Sep 17 00:00:00 2001 From: Geno Roupsky <185580+groupsky@users.noreply.github.com> Date: Mon, 9 Nov 2026 12:22:20 +0200 Subject: [PATCH 2/4] docs: add the code of conduct, issue forms and pull request template --- .github/ISSUE_TEMPLATE/bug_report.yml | 60 ++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 32 +++++++++ .github/pull_request_template.md | 11 +++ CODE_OF_CONDUCT.md | 83 ++++++++++++++++++++++ CONTRIBUTING.md | 2 +- 6 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/pull_request_template.md create mode 100644 CODE_OF_CONDUCT.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..ab35085 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,60 @@ +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 broker's lines from `journalctl -u nodkey` if you have + them. Remove tokens, keys, host names and addresses first. + render: text diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec69b0d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..a4feb14 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -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 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..83b72ed --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,11 @@ +Closes # + + + +## 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. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..737de08 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee4941d..62c9afa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ 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)): +and `git` ([DESIGN.md section 17](DESIGN.md#17-testing)): ```sh go test -race -tags e2e ./test/e2e/... From 9d4d0f68fa2dd4fe1ce389154a272e754b14125e Mon Sep 17 00:00:00 2001 From: Geno Roupsky <185580+groupsky@users.noreply.github.com> Date: Mon, 9 Nov 2026 12:22:33 +0200 Subject: [PATCH 3/4] docs: list the community files in AGENTS.md --- AGENTS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 9aa1356..4d8b60c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 From 87336c05c9cf67d2e5907527cbe76f407c61d67e Mon Sep 17 00:00:00 2001 From: Geno Roupsky <185580+groupsky@users.noreply.github.com> Date: Mon, 9 Nov 2026 12:23:49 +0200 Subject: [PATCH 4/4] docs: fix the review findings in the community files --- .github/ISSUE_TEMPLATE/bug_report.yml | 6 ++++-- CONTRIBUTING.md | 11 ++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ab35085..43e8631 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -55,6 +55,8 @@ body: attributes: label: Log lines description: | - The error, and the broker's lines from `journalctl -u nodkey` if you have - them. Remove tokens, keys, host names and addresses first. + 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 62c9afa..dd7d8e8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,9 @@ Everyone who takes part follows the ## Report a bug or ask for a feature Open an [issue](https://github.com/code6x/nodkey/issues/new/choose) and -choose a form. Every issue has a **"Done when"** list: the checks that -show the work is done. The issue closes when every box has evidence. +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. @@ -60,9 +61,9 @@ go test -race -tags e2e ./test/e2e/... 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:** only the standard library, `golang.org/x/crypto` and - `github.com/BurntSushi/toml`. Anything else needs a reason in the pull - request ([AGENTS.md](AGENTS.md#rules)). +- **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