41 Commits

Author SHA1 Message Date
dependabot[bot] 4fb8b89d4e build(deps): bump golang from 1.25.12-alpine to 1.25.13-alpine (#3087)
Bumps golang from 1.25.12-alpine to 1.25.13-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.13-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Iryna Kulakova <52420926+IrynaKulakova@users.noreply.github.com>
2026-08-18 14:29:26 +02:00
dependabot[bot] 05ebfd54be build(deps): bump distroless/base-debian12 from 348dac1 to 76b3162 (#3088)
Bumps distroless/base-debian12 from `348dac1` to `76b3162`.

---
updated-dependencies:
- dependency-name: distroless/base-debian12
  dependency-version: 76b3162a31477bca4a245b836c624f4c4a1a3705e99b9003907d992bec2c4bca
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-18 14:21:28 +02:00
dependabot[bot] 9184f777bd build(deps): bump distroless/base-debian12 from 9c05cfd to 348dac1
Bumps distroless/base-debian12 from `9c05cfd` to `348dac1`.

---
updated-dependencies:
- dependency-name: distroless/base-debian12
  dependency-version: 348dac1808083ccc3366399d6db835875b4eaf7c9b694783f5a3f353c4b58a28
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-21 08:44:27 +02:00
dependabot[bot] 4307ff801b build(deps): bump node from a2dc166 to e88a35b
Bumps node from `a2dc166` to `e88a35b`.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-16 13:55:28 +02:00
dependabot[bot] 8ac674b056 build(deps): bump distroless/base-debian12 from e7e678c to 9c05cfd
Bumps distroless/base-debian12 from `e7e678c` to `9c05cfd`.

---
updated-dependencies:
- dependency-name: distroless/base-debian12
  dependency-version: 9c05cfd65f41c93a909ea67eb05b920a3b838780ea55df5421d48295d98ff957
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-15 15:40:37 +02:00
dependabot[bot] e62ce5fdde build(deps): bump golang from 1.25.11-alpine to 1.25.12-alpine
Bumps golang from 1.25.11-alpine to 1.25.12-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.12-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-15 15:40:23 +02:00
Sam Morrow 8ce77e3c16 feat(oauth): add stdio OAuth 2.1 login core library (1/4) (#2704)
* feat(oauth): add stdio OAuth 2.1 stdio login
Introduce internal/oauth, a self-contained library that performs the
user-facing GitHub OAuth login the stdio server uses to obtain a token
without a pre-provisioned PAT. It is independent of MCP: client concerns
(elicitation) sit behind the Prompter interface so the flows are testable
without a live session.

What it provides:
- Authorization-code + PKCE flow with a local loopback callback server,
  state/CSRF validation, and XSS-safe result pages.
- Device-authorization flow as a fallback (headless, containers).
- A Manager that selects the most secure available channel
  (browser auto-open -> URL elicitation -> last-resort user action),
  runs a single flow at a time, and exposes a refreshing token source.

Both GitHub OAuth Apps and GitHub Apps are supported without special
casing: the token is modeled as an x/oauth2 refreshing TokenSource, so
expiring GitHub App user tokens are renewed transparently (the gap that
made a stored-token approach silently die after ~8h).

When a client lacks secure URL elicitation and the flow falls back to a
tool-response message, the message advises the user that their agent/CLI/
IDE does not appear to support URL elicitation and suggests requesting it
for improved security.

Tests exercise real protocol behavior against an httptest GitHub stand-in:
PKCE challenge/verifier, GitHub App refresh-on-expiry, device polling,
URL elicitation, declined prompts, the last-resort action with advisory,
and single-flight concurrency.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(oauth): reap browser launcher and keep native callback on loopback

Address code review:
- openBrowser: reap the launcher process asynchronously so it does not
  linger as a zombie for the lifetime of the server.
- listenCallback: take an explicit bindAll flag and bind to all interfaces
  only inside a container (where the published port arrives via eth0).
  A native run, even with a fixed callback port, now stays on 127.0.0.1
  instead of 0.0.0.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(oauth): fail fast when a fixed callback port is unavailable

A fixed --oauth-callback-port is registered with the OAuth app and chosen
deliberately, so a bind failure means another process holds the port and
could intercept the authorization redirect. Treat that as fatal instead of
silently downgrading to the device flow, which would mask the conflict.

Also warn, when binding the callback inside a container, that the listener
is on all interfaces and should be published to loopback only so the
authorization code is not exposed on the container network.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(oauth): surface refresh failures, bound refresh, prefer device flow when headless

Addresses pre-merge review of the OAuth stdio core:

- Log a one-time warning when token refresh fails instead of silently
  returning an empty access token, so a forced re-login isn't a surprise.
- Bound each background token refresh with a 30s HTTP client timeout so a
  stalled GitHub token endpoint can't block tool calls indefinitely.
- On a headless host (no display server) with a random callback port, fall
  back to the device-code flow — the only channel reachable from a browser
  on another machine — instead of dead-ending on an unreachable localhost
  redirect. A generic browser-open failure still offers the manual URL.
- Mark the callback bind failure with a sentinel so the fixed-port-busy
  fatal path can't misreport an unrelated error as a port conflict.
- Export NormalizeHost so callers can recognize the default github.com host
  (consumed by the build-time baked-in credential guard).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(oauth): wire stdio OAuth 2.1 login into the server (2/4) (#2710)

* feat(oauth): wire stdio OAuth 2.1 login into the server

Connect the internal/oauth core library to the stdio MCP server so users
can authenticate with an OAuth App or GitHub App client ID instead of a
static personal access token.

- BearerAuthTransport gains a TokenProvider that is consulted per request,
  letting the lazily-acquired, auto-refreshing OAuth token take effect
  without rebuilding the client.
- createGitHubClients uses BearerAuthTransport (and skips go-github's
  WithAuthToken, which would pin a static token) when a TokenProvider is set.
- RunStdioServer starts without a token and installs receiving middleware
  that runs the authorization flow on the first tool call, surfacing the
  auth URL or device code via elicitation (or a tool result as a fallback).
- Tool filtering uses the requested OAuth scopes; the default supported set
  hides nothing, while a narrower --oauth-scopes both narrows the grant and
  filters tools accordingly.
- A sessionPrompter adapts the MCP server session to oauth.Prompter, keeping
  the authorization URL off the model's context.
- New stdio flags: --oauth-client-id/-client-secret/-scopes/-callback-port.

This is stdio-only and deliberately does not touch MCP-HTTP auth.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* refactor(oauth): address review — omit empty bearer header, guard token/oauth

- BearerAuthTransport omits the Authorization header entirely when the token
  is empty (pre-authorization) rather than sending an empty "Bearer " value.
- RunStdioServer rejects the ambiguous combination of a static Token and an
  OAuthManager up front, enforcing the documented mutual exclusivity.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(oauth): clarify SupportedScopes is the stdio default and tool filter

Document that stdio OAuth login requests these scopes by default and then
filters the exposed tools to the scopes actually granted, so a tool whose
required scope is absent from this list is hidden under default OAuth even
though a PAT carrying that scope would expose it. Keep the list in sync with
tool scope requirements when scopes change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Distinguish undeliverable auth prompts from user declines

An elicitation prompt that the client cannot deliver (a transport or
protocol failure) was treated the same as a user actively declining: any
display error cancelled the flow. That conflated a system failure with a
deliberate "no", so a client that advertised URL elicitation but failed
to deliver it would hard-fail the login instead of degrading.

Add an ErrPromptUnavailable sentinel alongside ErrPromptDeclined and have
the MCP adapter return it when Elicit fails at the transport level. The
manager now falls back to the manual user-action channel on an
undeliverable prompt (keeping the background flow alive so the user can
still authorize out of band), while a genuine decline still aborts. A
context-cancelled prompt is checked first so an ending flow is never
misread as a transport failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* build(oauth): bake in default OAuth credentials for official releases (3/4) (#2711)

* build(oauth): bake in default OAuth credentials via build-time ldflags

Inject the public OAuth client credentials (stored as the OAUTH_CLIENT_ID
and OAUTH_CLIENT_SECRET repo secrets) at build time via -ldflags so
official binaries and images ship a working default app for zero-config
login. Security relies on PKCE, not on the secret. Local/dev builds leave
the values empty and continue to require an explicit token or
--oauth-client-id.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(oauth): recognize github.com host aliases for the baked-in client

Match the default host via oauth.NormalizeHost instead of only an empty
host string, so an explicit GITHUB_HOST=github.com (or api.github.com)
still counts as the default and keeps zero-config baked-in login working.
GHES and ghe.com users continue to bring their own --oauth-client-id.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs(oauth): document stdio OAuth login; make PAT optional in install config (#2717)

Add a dedicated Local Server OAuth Login guide (docs/oauth-login.md) covering
the PKCE/device flows, display channels and the URL-elicitation security
advisory, scope-based tool filtering, the fixed-port Docker recipe and its
loopback/port-safety behavior, bringing your own OAuth or GitHub App, and the
GitHub Enterprise Server / ghe.com requirement to register an app on that host
(custom --gh-host directs login at that instance's authorization server).

Reflect that the local server now logs in with OAuth by default on github.com:
- README: make the stdio Docker install badges OAuth-first (fixed callback port
  8085 published to loopback), drop the PAT prompt, and reframe the PAT as an
  optional alternative with a pointer to the new guide.
- server.json: make GITHUB_PERSONAL_ACCESS_TOKEN optional and publish the OAuth
  callback port so the registry default works without a token.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-26 11:59:35 +02:00
dependabot[bot] 27d8463731 build(deps): bump node from 3ad34ca to a2dc166 (#2752)
Bumps node from `3ad34ca` to `a2dc166`.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 12:17:39 +02:00
dependabot[bot] 6f338707d8 build(deps): bump golang from 8d95af5 to 523c3ef (#2753)
Bumps golang from `8d95af5` to `523c3ef`.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.11-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-23 12:17:14 +02:00
dependabot[bot] 6586b84b1a build(deps): bump node from 144769e to 3ad34ca (#2697)
Bumps node from `144769e` to `3ad34ca`.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-16 11:02:49 +02:00
dependabot[bot] 117bace5eb build(deps): bump distroless/base-debian12 from 58695f4 to e7e678c (#2698)
Bumps distroless/base-debian12 from `58695f4` to `e7e678c`.

---
updated-dependencies:
- dependency-name: distroless/base-debian12
  dependency-version: e7e678c88c59e70e105a46549bb3fbfb3d732ee3b4afd3a19fdab2e15afaa6b3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-16 11:02:37 +02:00
dependabot[bot] de9aee0afa build(deps): bump golang from cd2fb35 to 8d95af5 (#2699)
Bumps golang from `cd2fb35` to `8d95af5`.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.11-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-16 11:02:14 +02:00
dependabot[bot] f2219746b5 build(deps): bump node from 7c6af15 to 144769e (#2598)
Bumps node from `7c6af15` to `144769e`.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Morrow <info@sam-morrow.com>
2026-06-11 14:52:53 +02:00
dependabot[bot] 2cff183ca0 build(deps): bump golang from 1.25.10-alpine to 1.25.11-alpine (#2597)
Bumps golang from 1.25.10-alpine to 1.25.11-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.11-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Morrow <info@sam-morrow.com>
2026-06-11 14:00:30 +02:00
dependabot[bot] 9950148c9d build(deps): bump node from e71ac5e to 7c6af15
Bumps node from `e71ac5e` to `7c6af15`.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 26-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-28 13:25:05 +02:00
dependabot[bot] 91336dc982 build(deps): bump distroless/base-debian12 from 9dce90e to 58695f4 (#2497)
Bumps distroless/base-debian12 from `9dce90e` to `58695f4`.

---
updated-dependencies:
- dependency-name: distroless/base-debian12
  dependency-version: 58695f439f772a00009c8f6be4c183f824c1f556d74b313c30900f167e4772f8
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 09:05:58 +02:00
dependabot[bot] fb8d48b7af build(deps): bump node from 20-alpine to 26-alpine (#2013)
Bumps node from 20-alpine to 26-alpine.

---
updated-dependencies:
- dependency-name: node
  dependency-version: 25-alpine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 17:56:34 +02:00
dependabot[bot] f4b95e6acc build(deps): bump golang from 1.25.9-alpine to 1.25.10-alpine (#2455)
Bumps golang from 1.25.9-alpine to 1.25.10-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.10-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 16:28:19 +02:00
dependabot[bot] f363fd0d65 build(deps): bump golang from 04d017a to 5caaf1c
CodeQL / Analyze (go) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
Bumps golang from `04d017a` to `5caaf1c`.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.9-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-21 16:33:41 +02:00
dependabot[bot] 7e7fb96e27 build(deps): bump golang from 1.25.8-alpine to 1.25.9-alpine
Bumps golang from 1.25.8-alpine to 1.25.9-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.9-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-16 09:45:55 +02:00
dependabot[bot] 65f31c8872 build(deps): bump distroless/base-debian12 from 937c7ea to 9dce90e
Bumps distroless/base-debian12 from `937c7ea` to `9dce90e`.

---
updated-dependencies:
- dependency-name: distroless/base-debian12
  dependency-version: 9dce90e688a57e59ce473ff7bc4c80bc8fe52d2303b4d99b44f297310bbd2210
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-15 09:53:00 +02:00
dependabot[bot] 801648b102 build(deps): bump golang from 1.25.7-alpine to 1.25.8-alpine
Bumps golang from 1.25.7-alpine to 1.25.8-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.8-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-10 08:34:24 +01:00
Sam Morrow 5e1c94b25c fix: pin Docker base images to SHA256 digests
Pin all three Dockerfile base images to their SHA256 digests to resolve
code scanning alerts for unpinned Docker images. Dependabot docker
ecosystem is already configured and will keep these digests up to date.

- node:20-alpine (alert #14)
- golang:1.25.7-alpine (alert #15)
- gcr.io/distroless/base-debian12 (proactive)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 17:06:01 +01:00
Matt Holloway e83440db58 Add initial PoC for MCP Apps for select tools under Insiders (#1957)
* PoC full flow (hello world example)

* add avatar resource domain

* add postmessage logic and richer UI

* add create issue ui

* update ui for issue creatioon

* fix

* ignore banner

* update docs after rebase

* update toolsnap for get_me

* new UI changes

* update docs

* update workflows that need ui build

* add UI diff

* fix build ui step for windows runners to use git bash

* fix UI diff

* refactor issue creation UI

* add AvatarWithFallback component and update UserCard to use it; enhance CreateIssueApp to manage existing issue data

* fix formatting of button labels

* add create pull request functionality with UI support and insiders

* update docs

* add test for insiders mode handling in ServerTool schema

* remove `show_ui` param for now

* make insiders mode metadata stripping generic

* remove ui diff

* fix CI

* remove redundant mention of old app name

* add node types to fix ide issues for ts code

* remove unused TriangleDownIcon import

* update @primer/behaviors and electron-to-chromium versions in package-lock.json

* add check to ensure base and head are not the same when creating a new PR

* remove old show_ui

* fix gitignore for dist so builds dont break

* add tests for insiders mode handling and metadata stripping in ServerTool

* remove unused state and components from CreatePRApp

* fix ui build

* update docker build to fix npm issue

* remove reference to show_ui

* allow insiders to work for non-ui features

* formalise insiders inventory support

* update docs

* fix overflow issues and replace pull request dropdown with matching UI from dotcom

* fix createpullrequest test

* consolidate fetching tools under `ui_get` tool to remove toolset deps

* fix issue data prefill in issue_write form

* fix link component when updating issue

* fix avatar URL

* fix broken issue update logic

* remove dbg

* fix for new GetFlags

* revert to original required fields for create_pull_request

* fix for UI form submission

* Simplify MCP App UIs for basic branch

Remove advanced features to be kept in mcp-ui-apps-advanced:
- Strip labels, assignees, milestones, issue types, repo picker from issue-write
- Strip repo picker, branch selectors from pr-write
- Delete ui_get tool (ui_tools.go, ui_tools_test.go, ui_get.snap)
- Remove UIGet registration from tools.go

Basic forms retain: title, body, submit with _ui_submitted,
draft/regular split button (PR), MarkdownEditor, and SuccessView.

* Fix header spacing in issue-write and pr-write UIs

Add proper spacing between icon, title text, and repo name in the
header bar for both issue-write and create-pull-request forms.

* fix UI spacing

* Add insiders flag to User-Agent header

When InsidersMode is enabled, append '(insiders)' to the User-Agent
string sent with GitHub API requests, enabling server-side adoption
tracking.

* address ui feedback

* added ui/no-ui support

* improve active state UI for write and preview button. make padding consistent in textarea

* return to prev non ui check

* use hardcoded client name check for ui support

* linter fixes

* merge fix

* linter fix 2

---------

Co-authored-by: tommaso-moro <tommaso-moro@github.com>
2026-02-12 13:03:00 +00:00
dependabot[bot] 50ad0c80d4 build(deps): bump golang from 1.25.6-alpine to 1.25.7-alpine
Bumps golang from 1.25.6-alpine to 1.25.7-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.7-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-09 22:32:41 +01:00
Adam Holt 4d0d0ba45f Expose HTTP port (#1967) 2026-02-06 16:41:45 +01:00
dependabot[bot] 51fc176c1b build(deps): bump golang from 1.25.4-alpine to 1.25.6-alpine
Bumps golang from 1.25.4-alpine to 1.25.6-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.6-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 19:32:36 +01:00
Sam Morrow fc079ee498 Build full package in Dockerfile to include all commands (#1844)
* Pin go-licenses to v2.0.1 for reproducible builds

Fixes code scanning alerts #10 and #11 by removing the @latest
version for local development and using the pinned v2.0.1 version
consistently across all environments.

This ensures deterministic builds and addresses the CWE-494
'Download of Code Without Integrity Check' security concern.

* Build full package in Dockerfile to include all commands
2026-01-20 09:36:17 +01:00
dependabot[bot] b466148a55 build(deps): bump golang from 1.25.3-alpine to 1.25.4-alpine (#1381)
Bumps golang from 1.25.3-alpine to 1.25.4-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.4-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JoannaaKL <joannaakl@github.com>
2025-11-11 17:46:56 +01:00
dependabot[bot] 3ddf649d8a build(deps): bump golang from 1.25.1-alpine to 1.25.3-alpine (#1263)
Bumps golang from 1.25.1-alpine to 1.25.3-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.3-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 13:01:45 +02:00
Babbage 35b0da2495 Add container label & improve registry script (#1143)
License Check / license-check (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
* Add publish script and formed server file

* Add dockerfile label and clean script

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-26 12:08:03 +01:00
dependabot[bot] 2a0c7bff82 build(deps): bump golang from 1.24.4-alpine to 1.25.1-alpine (#1063)
Bumps golang from 1.24.4-alpine to 1.25.1-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.1-alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony Truong <tonytrg@github.com>
2025-09-16 18:07:48 +02:00
dependabot[bot] 41d12695ed build(deps): bump golang from 1.24.3-alpine to 1.24.4-alpine (#496)
Bumps golang from 1.24.3-alpine to 1.24.4-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.4-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony Truong <tonytrg@github.com>
2025-06-17 17:26:59 +02:00
Juan Antonio Osorio 63d3d8c60e fix: use ENTRYPOINT and CMD for proper argument handling (#454)
* fix: use ENTRYPOINT and CMD for proper argument handling

- Change from CMD to ENTRYPOINT + CMD pattern for better Docker practices
- ENTRYPOINT sets the executable that always runs
- CMD provides default arguments that can be overridden
- This allows container runtimes to properly append additional arguments
- Fixes issues with argument passing in container orchestration tools

Before: CMD ["./github-mcp-server", "stdio"]
After: ENTRYPOINT ["./github-mcp-server"] + CMD ["stdio"]

* address review feedback: use absolute path and improve comments
2025-06-03 00:19:59 +02:00
dependabot[bot] bd6f90dc9c build(deps): bump golang from 1.24.2-alpine to 1.24.3-alpine
Bumps golang from 1.24.2-alpine to 1.24.3-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.3-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-13 12:55:51 +02:00
Eng Zer Jun 29bf8bfebc Optimize Docker build with bind mounts (#208)
* Optimize Docker build with bind mounts

This commit further optimize the Docker builds on top of PR #92 with:

1. Add .dockerignore file to exclude non-source code files [1].

2. Use Alpine image variant for build stage to reduce download size.
   golang:1.23.7-alpine is 200 MB smaller than golang:1.23.7 [2][3].

3. Replace COPY instruction with RUN --mount=type=bind. Bind mounts do
   not add unnecessary layers to the cache [4][5].

[1]: https://docs.docker.com/build-cloud/optimization/#dockerignore-files
[2]: https://hub.docker.com/layers/library/golang/1.23.7-alpine/images/sha256-333d4ba78773b3a3ae9cf2cff8962df56effc5c9481faa355f211abf2baf175c
[3]: https://hub.docker.com/layers/library/golang/1.23.7/images/sha256-2087a99c3235972660b3d35c1564d9d1a3f639dcace9c790acbabc7e938d1570
[4]: https://docs.docker.com/build/building/best-practices/#add-or-copy
[5]: https://docs.docker.com/build/cache/optimize/#use-bind-mounts

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* Remove `go mod download` step

`go build` will automatically download module dependencies. In many
cases, that is a much smaller set of modules than what is downloaded by
`go mod download`.

Size of GOMODCACHE with `go mod download:

	$ go clean -i -r -cache -modcache
	$ go mod download
	$ du -sh ~/go/pkg/mod
	186M	/home/jun/go/pkg/mod

Size of GOMODCACHE with `go build`:

	$ go clean -i -r -cache -modcache
	$ CGO_ENABLED=0 go build -ldflags="-s -w" cmd/github-mcp-server/main.go
	go: downloading github.com/spf13/viper v1.20.1
	go: downloading github.com/mark3labs/mcp-go v0.18.0
	go: downloading github.com/google/go-github/v69 v69.2.0
	go: downloading github.com/sirupsen/logrus v1.9.3
	go: downloading github.com/spf13/cobra v1.9.1
	go: downloading golang.org/x/sys v0.31.0
	go: downloading github.com/spf13/afero v1.14.0
	go: downloading github.com/fsnotify/fsnotify v1.8.0
	go: downloading github.com/spf13/cast v1.7.1
	go: downloading github.com/go-viper/mapstructure/v2 v2.2.1
	go: downloading github.com/subosito/gotenv v1.6.0
	go: downloading gopkg.in/yaml.v3 v3.0.1
	go: downloading github.com/spf13/pflag v1.0.6
	go: downloading github.com/pelletier/go-toml/v2 v2.2.3
	go: downloading github.com/sagikazarmark/locafero v0.9.0
	go: downloading golang.org/x/text v0.23.0
	go: downloading github.com/google/uuid v1.6.0
	go: downloading github.com/yosida95/uritemplate/v3 v3.0.2
	go: downloading github.com/sourcegraph/conc v0.3.0
	go: downloading github.com/google/go-querystring v1.1.0
	$ du -sh ~/go/pkg/mod
	80M	/home/jun/go/pkg/mod

Reference: https://stackoverflow.com/a/68172023/7902371
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2025-05-07 17:09:28 +02:00
dependabot[bot] 3134b0996a Bump golang from 1.23.7 to 1.24.2
Bumps golang from 1.23.7 to 1.24.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.24.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-23 17:27:40 +02:00
Ariel Deitcher 9e2b1f03a5 speed up docker builds (#92) 2025-04-03 15:19:00 -07:00
Sam Morrow 5c6f43d237 chore: set build arg for publishing version (#74) 2025-04-03 13:16:09 +02:00
Sam Morrow fa8c23ae47 add ld flags so version is included in docker releases (#73) 2025-04-03 12:56:44 +02:00
Sam Morrow fca7cd754b chore: add dockerfile 2025-03-20 15:45:09 +01:00