Skip to content
Merged
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
19 changes: 19 additions & 0 deletions .credo.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC
# SPDX-License-Identifier: Apache-2.0
#
# Credo's defaults, plus the two security-relevant warnings its defaults leave off, on the code
# that ships (lib/), as in beam_mcp: UnsafeToAtom (atoms from input exhaust the atom table) and
# LeakyEnvironment (a spawned command inheriting the environment, secrets included).
%{
configs: [
%{
name: "default",
checks: %{
extra: [
{Credo.Check.Warning.UnsafeToAtom, [files: %{included: ["lib/"]}]},
{Credo.Check.Warning.LeakyEnvironment, [files: %{included: ["lib/"]}]}
]
}
}
]
}
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC
# SPDX-License-Identifier: Apache-2.0

version: 2
updates:
- package-ecosystem: mix
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: "deps"

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: "ci"
50 changes: 49 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# SPDX-License-Identifier: Apache-2.0
#
# The same three OTP/Elixir pairs as beam_mcp (floor, pinned, head): format, compile with
# warnings as errors, the suite. Actions pinned by commit SHA with the version beside it.
# warnings as errors, Credo --strict (.credo.exs), the Hex audit (retired packages and OSV
# advisories against mix.lock), the suite; and the DCO sign-off on every commit, as beam_mcp's
# gate workflow checks it. Actions pinned by commit SHA with the version beside it.
name: ci

on:
Expand Down Expand Up @@ -36,4 +38,50 @@ jobs:
- run: mix deps.get
- run: mix format --check-formatted
- run: mix compile --warnings-as-errors
- run: mix credo --strict
- run: mix hex.audit
- run: mix test

dco:
name: DCO sign-off
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: every commit in the range carries a Signed-off-by
run: |
set -uo pipefail
before="${{ github.event.before }}"
if [ "${{ github.event_name }}" = "pull_request" ]; then
range="origin/${{ github.base_ref }}..HEAD"
git rev-list --no-merges "$range" > /tmp/commits \
|| { echo "cannot resolve $range"; exit 1; }
elif [ -z "$before" ] \
|| [ "$before" = "0000000000000000000000000000000000000000" ] \
|| ! git rev-parse --verify --quiet "$before^{commit}" >/dev/null; then
# Two cases, one fallback. A branch's first push has no previous state, so
# github.event.before is the all-zeros SHA. A force-push names a real-looking SHA
# that is no longer reachable -- dropping a commit leaves `before` pointing at
# something the fetched history does not contain. Testing the SHA's SHAPE catches
# only the first; asking git whether it RESOLVES catches both.
echo "before is unusable ('$before'): checking every commit reachable from HEAD"
git rev-list --no-merges HEAD > /tmp/commits \
|| { echo "cannot list commits from HEAD"; exit 1; }
else
range="$before..HEAD"
git rev-list --no-merges "$range" > /tmp/commits \
|| { echo "cannot resolve $range"; exit 1; }
fi
echo "commits in scope: $(wc -l < /tmp/commits)"
fail=0
while read -r sha; do
[ -z "$sha" ] && continue
if git log -1 --format='%B' "$sha" | grep -q '^Signed-off-by: '; then
echo " ok $sha"
else
echo " FAIL $sha carries no Signed-off-by"; fail=1
fi
done < /tmp/commits
exit $fail
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ SPDX-License-Identifier: Apache-2.0

## [Unreleased]

### Added: the project's pages and checks (no code change)

- `SECURITY.md` (private reporting, commitments, what a host can rely on, one known limit),
`CONTRIBUTING.md`, `CODE_OF_CONDUCT.md` (Contributor Covenant 2.1, CC-BY-4.0 in
`LICENSES/`), `GOVERNANCE.md`, and `docs/`: architecture, assurance case, roadmap,
verifying a release (the tag-signing key's fingerprint). The pages are in the docs extras.
- CI: `mix credo --strict` (Credo as a dev/test dependency; `.credo.exs` adds `UnsafeToAtom`
and `LeakyEnvironment` on `lib/`), `mix hex.audit`, and a DCO sign-off check on every
commit. Dependabot weekly for Mix and GitHub Actions.
- `tools/release_tarball.sh`, beam_mcp's canonical-tarball script, and `files:` in `mix.exs`
as globs, so a release's bytes are the same on every machine.
- README: the OpenSSF Best Practices badge and links to the pages above.

## [0.1.1] — 2026-09-19

### Changed
Expand Down
88 changes: 88 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!--
SPDX-FileCopyrightText: 2014 Coraline Ada Ehmke and the Contributor Covenant contributors
SPDX-License-Identifier: CC-BY-4.0
-->

# 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 **ayla@scriptkittyos.com**, the maintainer (the address `SECURITY.md` names). A report about the maintainer themselves goes to the same address and is handled under the same guidelines; with one maintainer there is no one else to route it to, and this page says so rather than implying otherwise. 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
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!--
SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC
SPDX-License-Identifier: Apache-2.0
-->

# Contributing

Issues and pull requests are welcome on
[GitHub](https://github.com/ScriptKittyOS/beam_mcp_signer). A pull request is the only way a
change reaches `main`; it is rebased, never merged, so the history stays linear. The
maintainer reviews and decides (`GOVERNANCE.md`).

## Getting set up

```sh
git clone https://github.com/ScriptKittyOS/beam_mcp_signer && cd beam_mcp_signer
asdf install # the Erlang/OTP and Elixir versions .tool-versions pins (any manager that reads it works)
mix deps.get
mix test
```

Erlang/OTP 27 or newer and Elixir 1.17 or newer, the same floor as `beam_mcp`. CI runs
`mix format --check-formatted`, `mix compile --warnings-as-errors`, `mix credo --strict`,
`mix hex.audit` and `mix test` on three OTP/Elixir pairs; run the same before you push.

## The rules, all enforced

1. **Sign off every commit.** `git commit -s` adds the `Signed-off-by` line, certifying the
[Developer Certificate of Origin](https://developercertificate.org/): you wrote the change or
have the right to submit it under this project's licence. CI fails a pull request with a
commit that lacks it.
2. **No tool-attribution trailers.** A commit message says what changed and why it is believed
correct.
3. **CI must be green.** Warnings are errors; there is no baseline to hold.
4. **Tests arrive with behaviour.** Every change that adds or changes behaviour adds tests for
it to the automated suite, in the same pull request. A bug fix carries a regression test
that was seen failing before the fix, and the commit message shows the failure. A change to
how the key is read or returned also keeps the key-source census
(`test/beam_mcp/signer/no_key_source_test.exs`) red when the rule is broken: plant the
break, show it red, restore it.

## Coding style

The Elixir community's: the output of `mix format` (this repository's `.formatter.exs`) and
[Credo](https://hexdocs.pm/credo/) in `--strict` mode, which implement the
[Elixir Style Guide](https://github.com/christopheradams/elixir_style_guide), plus the security
warnings `.credo.exs` enables. CI enforces both. `beam_mcp`'s
[`CONVENTIONS.md`](https://github.com/ScriptKittyOS/beam_mcp/blob/main/CONVENTIONS.md) records
the wider rules both packages are developed under.

## Conduct

Participation is under the [Code of Conduct](CODE_OF_CONDUCT.md) (the Contributor Covenant,
version 2.1).

## Reporting a vulnerability

Not in an issue. See `SECURITY.md`.
44 changes: 44 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--
SPDX-FileCopyrightText: 2026 Sudo Apt Holdings LLC
SPDX-License-Identifier: Apache-2.0
-->

# Governance

Who decides, how a change lands, and what happens if the maintainer stops. This package is
governed exactly as [`beam_mcp`](https://github.com/ScriptKittyOS/beam_mcp) is, by the same
person; its [governance page](https://github.com/ScriptKittyOS/beam_mcp/blob/main/docs/governance.md)
and [succession page](https://github.com/ScriptKittyOS/beam_mcp/blob/main/docs/succession.md)
apply here, and this page says what is particular to this repository.

## Roles

| role | who | responsibilities |
|---|---|---|
| **Maintainer** | one person: the ScriptKittyOS organization's administrator, the hex.pm owner of `beam_mcp_signer` (account `aylacroft`), and the address in `SECURITY.md` | decides what lands and when; reviews every pull request; keeps CI green; answers security reports on `SECURITY.md`'s commitments; tags (signed) and publishes releases; keeps this page, the roadmap and the CHANGELOG true |
| **Contributor** | anyone | proposes changes by pull request under `CONTRIBUTING.md`: signed off, tested, green; reports bugs and enhancements as issues; reports vulnerabilities privately |

There is no steering group and no vote. A decision is the maintainer's and is recorded in the
tree (a CHANGELOG entry, a page, a test) or it was not made. The bus factor is one, stated
rather than hidden.

## How a change lands

1. A branch and a pull request; nothing is pushed to `main` directly.
2. CI on three OTP/Elixir pairs (the floor, the pinned line, the newest) and the DCO check.
3. The maintainer's review, then a rebase merge.
4. A release is a signed tag and a hex.pm publish by the maintainer, recorded in the
CHANGELOG; `docs/verifying-releases.md` says how to check one.

## What is particular to this package

It is the one package of the two that handles key material, so a change to how the key is
read, used or returned is held to the key-source census and to `docs/assurance-case.md`, and
the assurance case changes in the same pull request.

## If the maintainer stops

`beam_mcp`'s succession page applies as written: the repository is public and forkable under
the organization, published releases stay on hex.pm, and a successor needs organization
ownership, `mix hex.owner add beam_mcp_signer` from the current owner (or hex.pm's support
process), and nothing else: this package holds no secret of its own.
Loading