Join our Newsletter — 33% off our NHI Course
Home› Guides› Source Control Platform Integration Security: Apps, Tokens and…
Guide Software & AI Supply Chain

Source Control Platform Integration Security: Apps, Tokens and Scopes for Connected Tools

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 15 min read
On this page

Every tool connected to your source control platform holds a credential that can read, and often change, your code, so the integration estate is as much a part of your software supply chain as the repositories themselves. A typical organisation connects its identity provider for single sign-on and provisioning, a SIEM for audit log streaming, ticketing and chat tools that link commits to work items, CI systems, code scanners, deployment tools and, increasingly, AI coding assistants. Each connection is a non-human identity with its own scopes, owner and lifetime, and each one is a route around the controls you put on human developers. This guide is for platform engineering, DevSecOps and identity teams. It covers the connection types, how to choose and scope credentials for each class of connected tool, and how to review, monitor and retire integrations. It is vendor-neutral, so confirm setting names in your platform's documentation. Hardening of the platform itself is in Securing the source control platform itself, which this page does not repeat.

Key takeaways

  • An integration is a credential held by someone else. Tokens granted to a connected tool are stored in that tool's systems, so its security becomes part of yours; inventory them as non-human identities with owners and expiry dates.
  • Prefer installable apps with granular permissions over user tokens. App-based integrations act as themselves, can be limited to named repositories and survive staff changes; personal tokens carry a human's full access and vanish or linger with that person.
  • Scope by repository and by action. A ticketing link needs read access to commit metadata on a few repositories, not write access to every repository in the organisation; least privilege applies per integration, not per vendor.
  • The IdP and SIEM connections are tier 0. Provisioning tokens can create members and the audit log stream is your evidence; protect both credentials as carefully as an owner account.
  • Review on a schedule and on events. Re-approve integrations at least quarterly, when a connected vendor reports an incident and when an app asks for new permissions.

The integration map

The OWASP Top 10 CI/CD Security Risks lists Ungoverned Usage of 3rd Party Services as CICD-SEC-8. Its description notes that third parties can be connected to a source control platform through installable apps, OAuth apps, access tokens, SSH keys and webhooks, often with no special approval, and with access ranging from one repository to administration of the whole organisation. It also records that organisations often cannot say which third parties have access, how they connected, what permissions they hold and which they actually use. The table maps the usual connected tools to the connection type they tend to use. It reflects common architecture and is NHI Mgmt Group's view.

Connected tool classTypical connectionAccess it usually needsWhat goes wrong
Identity provider (SSO)SAML or OpenID Connect federation trustAuthenticate members; no repository accessA changed signing certificate or issuer lets someone else assert identities
Identity provider (provisioning)SCIM bearer token or provisioning appCreate, update and suspend members and team membershipsA stolen token adds members to privileged teams
SIEM and log pipelineAudit log streaming endpoint, or a read token polling an audit APIRead audit events onlyWrite or admin scope on a token that only needed to read logs; stream silently disabled
Ticketing and work trackingApp or OAuth app, inbound webhooksRead commit, branch and pull request metadata on linked repositoriesOrganisation-wide code read access granted for a link feature
Chat and notification toolsApp plus outbound webhooksReceive events; sometimes post commentsCode or secrets in event payloads land in chat channels
CI and deploymentApp, job token, deploy key or OIDC federationRead code, write statuses, sometimes push tags or releasesLong-lived write tokens stored in the CI system
Code scanners and quality toolsApp or OAuth appRead code, write check results and commentsRead access to every repository through one compromised vendor account
AI coding assistants and agentsApp, OAuth app or user tokenRead code; agents may open branches and pull requestsAgent tokens with push rights to protected branches or bypass of review
Container registries and package toolsOAuth grant or stored user token for automated buildsRead source to build imagesTokens for many users stored in one third-party database

Relevant ATT&CK techniques are T1528 Steal Application Access Token, T1550.001 Application Access Token, T1199 Trusted Relationship and T1213.003 Code Repositories, which covers the bulk collection that follows when an integration token is replayed.

Choosing a credential type for each integration

Most platforms offer several ways to connect the same tool. The choice decides who owns the access, how narrowly it can be scoped and what happens when people leave.

Credential typeActs asScopingUse it forAvoid it for
Installable app with granular permissionsThe app itselfPer permission and per selected repository; short-lived installation tokensMost third-party and internal integrationsCases where the action must be attributed to a named human
OAuth app (user-delegated)The user who consentedCoarse scopes; reaches everything that user can reachTools that genuinely act on behalf of one userOrganisation-wide automation
Fine-grained personal access tokenA userPer repository and permission, with expiryShort-term scripts with a named ownerShared or long-running services
Classic personal access tokenA userBroad scopes across all of the user's accessLegacy only, with a retirement dateAny new integration
Machine user accountA shared pseudo-personWhatever the account is granted; consumes a seatPlatforms with no app modelAnything an app can do
Deploy key (SSH)A single repositoryOne repository, read only or read-writePulling one repository from a serverMulti-repository access, write by default
OIDC workload federationA pipeline jobClaims such as repository, branch and environmentCI jobs reaching clouds and registriesTools outside a pipeline
  • Tokens held by the vendor: for OAuth grants and stored tokens, the refresh token sits in the vendor's database. The OAuth 2.0 Security Best Current Practice (RFC 9700) says access tokens should be limited to the minimum resources and actions needed and restricted to the intended audience, and that refresh tokens for confidential clients stay bound to the client they were issued to. Treat a vendor breach notice as a token compromise until the vendor confirms otherwise.
  • Revocation limits: OAuth 2.0 Token Revocation (RFC 7009) says revoking a refresh token should also invalidate access tokens from the same grant where the server supports it, but self-contained access tokens can stay usable until they expire. Prefer integrations whose tokens are short-lived.
  • Platform-specific trade-offs: see the OAuth Apps vs Integration Service Accounts comparison.

Identity provider connections

  • Federation trust: the SSO configuration names the identity provider's issuer and signing certificate. Restrict who can change it to organisation owners, alert on every change and record the certificate fingerprint in your configuration baseline so drift is visible.
  • Provisioning token: SCIM (RFC 7644) allows bearer tokens over TLS and allows the service provider to request TLS client authentication; the RFC advises against basic authentication alone. In practice many platforms issue a long-lived bearer token. Hold it only in the identity provider's provisioning configuration and a secrets manager, rotate it on a schedule and when an identity administrator leaves, and confirm it is limited to member and team management.
  • Team mapping: provisioning often syncs identity provider groups to platform teams. A group mapped to an admin or maintainer team becomes a privilege path, so review mappings with the same rigour as role assignments. See the SCIM Provisioning Guide.
  • Deprovisioning reach: suspending a member through SCIM may not revoke tokens, SSH keys or OAuth grants the person created. Check what your platform revokes on suspension, and add a leaver step for anything it does not. The Identity provider (IdP) and SSO platform integration security guide covers the IdP side of these connections.

SIEM and audit log streaming

  • Push over pull where available: streaming the audit log to a storage bucket or event hub owned by the security team removes the need for a standing read token on the platform. Where polling is the only option, use a token limited to audit read with no repository scope.
  • Protect the stream itself: disabling or redirecting the stream is the first thing an intruder with owner rights would do. Alert on stream configuration changes and on gaps in event volume, and keep the destination credentials outside the platform team's control.
  • Events to keep: app installation, permission change and removal; OAuth app authorisation and revocation; token creation and use where logged; SSO and SCIM configuration changes; webhook creation and changes; repository visibility changes; clone and archive download events where your plan records them.
  • Event standards: some platforms can send or receive security events in the Security Event Token format (RFC 8417), a signed JSON Web Token that states facts about a subject such as a token revocation. Where supported, it lets the platform and the identity provider share revocation signals. See the SIEM Guide.

Ticketing, chat and work tracking

These integrations are installed by delivery teams for convenience, so they are the most likely to be over-scoped and forgotten. In the 2023 intrusion described in this 2023 breach analysis, credentials left unrotated after an earlier supplier incident included a service account used to access source code and another with administrative rights over the ticketing system, which the attacker used to keep access.

  • Link features need metadata, not code: commit and pull request linking usually needs read access to metadata on linked repositories. Grant it on the repositories the project uses, not the whole organisation.
  • Bidirectional links double the exposure: a ticketing system that holds a source control token, and a source control platform that holds a ticketing token, means a compromise of either reaches both. Use separate integration identities in each direction.
  • Payload content: event payloads sent to chat can contain commit messages, file names and diffs. Filter events to what the channel needs and keep code content out of shared channels. See the ChatOps Security Guide.
  • Service accounts in ticketing tools: if a ticketing automation uses a source control token, store it in the ticketing platform's secret store or a secrets manager, never in a ticket, wiki page or script body.

CI, scanners, AI tools and webhooks

  • CI: prefer short-lived job tokens and OIDC federation over stored tokens, and keep write permissions off by default. See the CI/CD Pipeline Identity Security Guide.
  • Scanners: code scanning apps need read access and the right to post check results. Treat a scanner vendor with organisation-wide read access as a holder of your entire codebase.
  • AI coding assistants and agents: an agent that opens pull requests should be an app identity subject to the same branch protection and required review as people, never on a bypass list. See the Securing the AI coding assistant estate.
  • Webhooks: configure a secret for every webhook so receivers can verify signatures, deliver only to HTTPS endpoints you own and alert on new or changed webhook URLs. See the Webhook Secrets Security Guide.

How to implement: a phased review

  1. Inventory (weeks 1 to 2): export installed apps, authorised OAuth apps, organisation and repository webhooks, deploy keys, machine users and, where the platform exposes them, personal tokens with access to organisation resources. Record for each: tool, connection type, permissions, repositories, owner, last use.
  2. Turn on approval: require owner approval for new app installations and OAuth app access, and set a maximum lifetime for personal tokens. Start by logging requests for a fortnight to learn the volume before enforcing.
  3. Triage: remove integrations with no owner or no use in 90 days (our recommendation). Disable first, wait two weeks for complaints, then delete. Disabling is the rollback path.
  4. Re-scope: move each surviving integration to the narrowest credential type from the table above and to selected repositories only. Pilot on one business unit, check that builds, links and scans still work, then roll out.
  5. Protect tier 0 connections: move SCIM tokens and SIEM destination credentials into a secrets manager, rotate them and add change alerts on SSO, SCIM, audit streaming and webhook configuration.
  6. Operate: quarterly re-approval by each owner, event-driven review when a vendor reports an incident or an app requests new permissions, and an offboarding step that revokes integrations when a tool is retired.

Decision guidance

  • App or OAuth app: if the tool works for the organisation (scanning, ticket links, notifications), use an app. If it acts for one person (a desktop client, an editor plugin), an OAuth app is appropriate, but restrict which OAuth apps can access organisation resources.
  • Allow-list or approval queue: small organisations can run a short allow-list of approved apps and block the rest. Large organisations usually need a request queue with an SLA, or teams will fall back to personal tokens.
  • Organisation-wide or selected repositories: organisation-wide installs are justified for security tooling that must see everything (secret scanning, audit). For everything else, select repositories.
  • Self-managed connectors: where a vendor offers a connector you run inside your network, you hold the token and control egress, at the cost of patching the connector yourself.

Detection and measurement

SignalWhy it matters
New app installation or OAuth authorisation outside the approval processConsent phishing and shadow integrations (T1671 Cloud Application Integration)
Permission upgrade accepted on an existing appScope creep that turns read into write
Integration token used from an unexpected network or at unusual volumeReplay of a stolen token (T1550.001)
Bulk clone or archive download by an integration identityCollection from code repositories (T1213.003)
Change to SSO, SCIM, audit streaming or webhook configurationTier 0 tampering or loss of evidence

Metrics that show the programme is working:

  • Owned integrations: percentage of apps, OAuth apps, tokens and webhooks with a named owner (target 100%).
  • Repository scoping: percentage of non-security integrations limited to selected repositories.
  • Classic token count: number of broad personal tokens with organisation access, trending to zero.
  • Re-approval completion: percentage of integrations re-approved in the last quarter.
  • Time to revoke: hours from a vendor incident notice to revocation of that vendor's tokens.

Framework mapping

FrameworkReferenceHow it applies
NIST CSF 2.0GV.SC-07, PR.AA-05, ID.AM-02, PR.PS-04Third-party risk across the relationship, least privilege, inventory of services, logs for monitoring
NIST SP 800-53 Rev. 5AC-6, IA-5, IA-9, SA-9, AU-6, CM-3Least privilege, authenticator management, service identification, external services, log review, change control
OWASP Top 10 CI/CD Security RisksCICD-SEC-2, CICD-SEC-6, CICD-SEC-8, CICD-SEC-10Identity and access, credential hygiene, third-party services, logging and visibility
MITRE ATT&CKT1528, T1550.001, T1199, T1213.003, T1671Token theft and replay, trusted relationship, repository collection, malicious integrations

Common failure patterns

  • Trusting the integrator's security by default: in 2022 OAuth tokens held by two trusted integrators were stolen and replayed to clone private repositories, as described in this 2022 OAuth token breach analysis.
  • Stored build tokens in a third-party database: a 2019 registry breach exposed source control tokens kept for automated builds, as set out in this 2019 registry breach analysis; affected users had to relink and review logs.
  • Letting any user consent to any app: a 2024 extortion campaign used fake alerts to get developers to authorise OAuth apps that could read and delete repositories.
  • Personal tokens as service credentials: a departed engineer's token keeps a build running, or breaks it when the account is suspended.
  • "Unused" without evidence: skipping rotation of an integration credential because nobody thinks it is used. Check last-use data before deciding.
  • Audit stream with no tamper alert: the stream stops and nobody notices until an investigation needs the logs.

Practitioner checklist

  • Export every app, OAuth app, webhook, deploy key, machine user and organisation-scoped token, with owner and last use.
  • Require owner approval for app installations and OAuth app access to organisation resources.
  • Set a maximum lifetime for personal tokens and plan retirement of classic tokens.
  • Limit every non-security integration to selected repositories and the minimum permissions.
  • Hold SCIM tokens and SIEM destination credentials in a secrets manager and rotate them.
  • Alert on changes to SSO, SCIM, audit streaming, webhooks and app permissions.
  • Put AI agents and bots under branch protection and required review, never on bypass lists.
  • Revoke a vendor's tokens within hours of its incident notice, then reauthorise on new credentials.
  • Re-approve integrations quarterly and revoke them when a tool is retired.

Standards and references

Related NHI Mgmt Group resources: Securing the source control platform itself, OAuth and SaaS integration breaches, SaaS and OAuth App Governance Guide, Consent Phishing and Illicit OAuth Grants Guide, Source control platform health check.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.