Files
gabrielvidal aecb37086d security(cli,ci,docs): default auto-upgrade to notify, harden installer/CLI/skills and pin CI actions
- Change default ASK_FORM_AUTO_UPGRADE to notify, enforce HTTPS/no-downgrade redirects,
  block pre-release auto-installs, and run smoke tests with an empty environment
- Validate browser URLs (http/https only) and relay URLs, write secrets atomically at 0600,
  add --token-file/--key-file, and harden systemd/launchd unit generation
- Enforce TLS 1.2 + strict semver tag validation in install.sh and npm publish scripts
- Validate and quote origins/keys in Claude.ai and MCP plugin zips
- Pin GitHub Actions to commit SHAs, scope job permissions, and document relay trust boundaries
2026-11-23 11:32:50 +01:00

54 lines
1.7 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version: "1.24"
cache: false # stdlib only: no go.sum to key a cache on
- name: gofmt
run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; }
- run: go vet ./...
- run: go test -race ./...
- name: Shell scripts
run: sh -n install.sh scripts/npm-packages.sh scripts/npm-publish.sh
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0 # git describe for the version
persist-credentials: false
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7
with:
go-version: "1.24"
cache: false # stdlib only: no go.sum to key a cache on
- name: Build every platform
run: make dist
- name: Smoke test
run: ./dist/ask-form-linux-amd64 version && ./dist/ask-form-relay-linux-amd64 version
# The relay's image copies the source folder by folder: a package it
# misses only shows here (v0.17.0's skill/).
- name: Relay image
run: docker build -q --build-arg VERSION=ci -t ask-form-relay:ci . && docker run --rm ask-form-relay:ci version
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: ask-form-${{ github.sha }}
path: dist/
retention-days: 14