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
19 changes: 8 additions & 11 deletions .github/actions/infisical-secrets/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Infisical secrets
description: >-
Fetch named secrets from Infisical (universal-auth), mask them, and export
Fetch named secrets from Infisical with a scoped service token, mask them, and export
them into $GITHUB_ENV -- falling back to a same-named GH_FALLBACK_<NAME>
step env var and warning (or failing, for a name listed in `required`)
when a name stays empty everywhere. Wraps scripts/infisical-fetch.mjs, a
Expand All @@ -11,8 +11,8 @@ description: >-
workflow command for that exact value, which is what scrubs it from the
rendered log from that point on.

Copied from Simple-With-Us/BotFleet on 2026-09-29 for CodeCaps'
mac-release.yml; keep the two copies in step.
Originated as a copy of the fleet action; CodeCaps uses scoped service-token
auth under the current owner policy.

NOTE: Usage-Monitor carries a parallel, not-yet-deduplicated copy of this
fetch inlined in its own .github/workflows/ios-ship.yml (lines 151-185 at
Expand Down Expand Up @@ -42,12 +42,10 @@ inputs:
description: Infisical secret path.
required: false
default: /
client-id:
description: Universal-auth machine identity client id.
required: true
client-secret:
description: Universal-auth machine identity client secret.
required: true
service-token:
description: Full Infisical service token scoped to this project, environment, and path.
required: false
default: ""
site-url:
description: Infisical site URL.
required: false
Expand All @@ -69,7 +67,6 @@ runs:
INFISICAL_PROJECT_ID: ${{ inputs.project-id }}
INFISICAL_ENVIRONMENT: ${{ inputs.environment }}
INFISICAL_SECRET_PATH: ${{ inputs.secret-path }}
INFISICAL_CLIENT_ID: ${{ inputs.client-id }}
INFISICAL_CLIENT_SECRET: ${{ inputs.client-secret }}
INFISICAL_SERVICE_TOKEN: ${{ inputs.service-token }}
INFISICAL_SITE_URL: ${{ inputs.site-url }}
run: node "$GITHUB_ACTION_PATH/../../../scripts/infisical-fetch.mjs"
19 changes: 9 additions & 10 deletions .github/workflows/ios-ship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ jobs:
with:
names: SENTRY_DSN SENTRY_DSN_CODECAPS SENTRY_AUTH_TOKEN SENTRY_AUTH_TOKEN_FULLSCOPE
project-id: ${{ secrets.INFISICAL_FLEET_OPS_PROJECT_ID }}
client-id: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID || secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET || secrets.INFISICAL_CLIENT_SECRET }}
secret-path: /
service-token: ${{ secrets.INFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN }}
env:
GH_FALLBACK_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
GH_FALLBACK_SENTRY_DSN_CODECAPS: ${{ secrets.SENTRY_DSN_CODECAPS }}
Expand Down Expand Up @@ -276,10 +276,10 @@ jobs:
# single-line and go to GITHUB_ENV; the multiline private key is staged
# to a mode-600 file and only ASC_KEY_PATH is exported.
#
# The tooling and the staging script run in ONE step on purpose. The
# tooling installs the Infisical CLI and the fleet's reader onto the
# runner, mints the access token they use, and runs the staging script
# in the same process tree, so the token never touches a file. The
# The tooling and the staging script run in ONE step on purpose.  The
# tooling installs the fleet's reader and passes it the scoped service
# token directly through its environment. The staging script runs in the
# same process tree, so the token never touches a file.  The
# staging script is what resolves the three ASC values, and it writes
# the private key to a mode-600 file: the key is never an environment
# variable of a step, and only that file's path and the two identifiers
Expand All @@ -291,8 +291,7 @@ jobs:
- name: Load and stage the ASC credentials (Fleet-OPS prod /asc)
env:
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_FLEET_OPS_PROJECT_ID }}
INFISICAL_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID || secrets.INFISICAL_CLIENT_ID }}
INFISICAL_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET || secrets.INFISICAL_CLIENT_SECRET }}
INFISICAL_SERVICE_TOKEN: ${{ secrets.INFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN }}
run: |
set +o xtrace
set -euo pipefail
Expand All @@ -304,12 +303,12 @@ jobs:
set -euo pipefail
for name in ASC_KEY_ID ASC_ISSUER_ID; do
if [ -z "${!name:-}" ]; then
echo "::error::Missing $name in Fleet-OPS prod /asc; verify the CI identity has read access to Fleet-OPS prod /asc." >&2
echo "::error::Missing $name in Fleet-OPS prod /asc; verify the scoped /asc read service token has access to Fleet-OPS prod /asc." >&2
exit 1
fi
done
if [ -z "${ASC_KEY_PATH:-}" ] || [ ! -s "${ASC_KEY_PATH:-}" ]; then
echo '::error::Missing ASC key material in Fleet-OPS prod /asc; verify the CI identity has read access to Fleet-OPS prod /asc.' >&2
echo '::error::Missing ASC key material in Fleet-OPS prod /asc; verify the scoped /asc read service token has access to Fleet-OPS prod /asc.' >&2
exit 1
fi
- name: Import signing identity
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/mac-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ name: Mac Release (Sparkle)
#
# Secrets (names only; no value is ever printed):
# MAC_CERT_P12_BASE64, MAC_CERT_PASSWORD The Developer ID Application
# certificate for team CC8UTF7ATG. Read from Infisical the way
# BotFleet's release.yml does (INFISICAL_FLEET_OPS_PROJECT_ID plus
# INFISICAL_UNIVERSAL_AUTH_CLIENT_ID/_SECRET, or INFISICAL_CLIENT_ID/
# _SECRET), with same-named repository secrets as the fallback.
# certificate for team CC8UTF7ATG. Read from Fleet-OPS Infisical prod /
# using INFISICAL_FLEET_OPS_PROJECT_ID and the read-only
# INFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN. Same-named repository secrets
# remain a fallback.
# ASC_KEY_ID, ASC_ISSUER_ID and the App Store Connect private key come from
# Fleet-OPS Infisical prod /asc, matching ios-ship.yml. Never fall back
# to the stale repository ASC_* secrets. The private key never enters
# Fleet-OPS Infisical prod /asc using that same read-only CI token.
# Never fall back to the stale repository ASC_* secrets. The private key never enters
# the job environment: the tooling install and
# scripts/stage-asc-key.mjs run in one step, so the key goes from the
# fleet's reader straight into a mode-600 file, and only that file's
Expand Down Expand Up @@ -135,8 +135,8 @@ jobs:
with:
names: MAC_CERT_P12_BASE64 MAC_CERT_PASSWORD SENTRY_DSN SENTRY_DSN_CODECAPS SENTRY_AUTH_TOKEN SENTRY_AUTH_TOKEN_FULLSCOPE
project-id: ${{ secrets.INFISICAL_FLEET_OPS_PROJECT_ID }}
client-id: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID || secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET || secrets.INFISICAL_CLIENT_SECRET }}
secret-path: /
service-token: ${{ secrets.INFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN }}
env:
GH_FALLBACK_MAC_CERT_P12_BASE64: ${{ secrets.MAC_CERT_P12_BASE64 }}
GH_FALLBACK_MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
Expand Down Expand Up @@ -176,10 +176,10 @@ jobs:
printf '%s\n' "$msg" >>"$RUNNER_TEMP/mac-release-sentry-dsn-missing"
fi

# The tooling and the staging script run in ONE step on purpose. The
# tooling installs the Infisical CLI and the fleet's reader onto the
# runner, mints the access token they use, and runs the staging script
# in the same process tree, so the token never touches a file. The
# The tooling and the staging script run in ONE step on purpose.  The
# tooling installs the fleet's reader and passes it the scoped service
# token directly through its environment. The staging script runs in the
# same process tree, so the token never touches a file.  The
# staging script is what resolves the three ASC values, and it writes
# the private key to a mode-600 file: the key is never an environment
# variable of a step, and only that file's path and the two identifiers
Expand All @@ -192,8 +192,7 @@ jobs:
if: github.event_name != 'pull_request'
env:
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_FLEET_OPS_PROJECT_ID }}
INFISICAL_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID || secrets.INFISICAL_CLIENT_ID }}
INFISICAL_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET || secrets.INFISICAL_CLIENT_SECRET }}
INFISICAL_SERVICE_TOKEN: ${{ secrets.INFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN }}
run: |
set +o xtrace
set -euo pipefail
Expand All @@ -206,12 +205,12 @@ jobs:
set -euo pipefail
for name in ASC_KEY_ID ASC_ISSUER_ID; do
if [ -z "${!name:-}" ]; then
echo "::error::Missing $name in Fleet-OPS prod /asc; verify the CI identity has read access to Fleet-OPS prod /asc." >&2
echo "::error::Missing $name in Fleet-OPS prod /asc; verify the scoped /asc read service token has access to Fleet-OPS prod /asc." >&2
exit 1
fi
done
if [ -z "${ASC_KEY_PATH:-}" ] || [ ! -s "${ASC_KEY_PATH:-}" ]; then
echo '::error::Missing ASC key material in Fleet-OPS prod /asc; verify the CI identity has read access to Fleet-OPS prod /asc.' >&2
echo '::error::Missing ASC key material in Fleet-OPS prod /asc; verify the scoped /asc read service token has access to Fleet-OPS prod /asc.' >&2
exit 1
fi
- name: Decide whether this run can publish
Expand Down Expand Up @@ -513,8 +512,7 @@ jobs:
- name: Load and stage the ASC credentials (Fleet-OPS prod /asc)
env:
INFISICAL_PROJECT_ID: ${{ secrets.INFISICAL_FLEET_OPS_PROJECT_ID }}
INFISICAL_CLIENT_ID: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID || secrets.INFISICAL_CLIENT_ID }}
INFISICAL_CLIENT_SECRET: ${{ secrets.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET || secrets.INFISICAL_CLIENT_SECRET }}
INFISICAL_SERVICE_TOKEN: ${{ secrets.INFISICAL_CODECAPS_CI_READ_SERVICE_TOKEN }}
run: |
set +o xtrace
set -euo pipefail
Expand All @@ -526,12 +524,12 @@ jobs:
set -euo pipefail
for name in ASC_KEY_ID ASC_ISSUER_ID; do
if [ -z "${!name:-}" ]; then
echo "::error::Missing $name in Fleet-OPS prod /asc; verify the CI identity has read access to Fleet-OPS prod /asc." >&2
echo "::error::Missing $name in Fleet-OPS prod /asc; verify the scoped /asc read service token has access to Fleet-OPS prod /asc." >&2
exit 1
fi
done
if [ -z "${ASC_KEY_PATH:-}" ] || [ ! -s "${ASC_KEY_PATH:-}" ]; then
echo '::error::Missing ASC key material in Fleet-OPS prod /asc; verify the CI identity has read access to Fleet-OPS prod /asc.' >&2
echo '::error::Missing ASC key material in Fleet-OPS prod /asc; verify the scoped /asc read service token has access to Fleet-OPS prod /asc.' >&2
exit 1
fi
- name: Verify notarization access before building
Expand Down
3 changes: 3 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
# other rule stays active, and a real credential in this repository is still
# caught.
053e42631eaf6389365bbb37dedb2d67143ca2f6:scripts/install-release-secrets-tooling.sh:generic-api-key:38

# The flagged line validates a runtime-supplied secret and contains no secret value.  This exception pins only its commit, path, rule, and line.
0aeb73d1c51baabd9a26fa13d807b10bb22cc693:Sources/QuotaCore/TwilioSMSClient.swift:generic-api-key:76
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Hosting and routing (apexes, hostnames, hosts, deploy paths): see [`Fleet-OPS/do
CodeCaps is a macOS menu-bar Swift app for **centralized monitoring and
alerting of every AI subscription plan on your Mac** — usage, quotas, and
caps across Claude, Codex, Cursor, Antigravity, Grok, MiniMax, and the
other AI CLIs already signed in. No provider API key is entered; CodeCaps
other AI CLIs already signed in.  Optional Z.ai coding-plan keys stay in Keychain; CodeCaps
uses existing local sign-ins to query supported provider quotas and local
helpers. Reading a credential file is not a passive quota-file refresh. The
same readings can be pushed to an endpoint you run and pulled back into the
Expand Down
Loading