Skip to content
Software development
ASD ISMISM-2030

ASD ISM 2030 Commit-time scanning blocks secrets from source repositories

What it says

Scanning is used during commits to identify plain text or encoded credentials, keys and secrets, which are then blocked from being stored in the authoritative source for software.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

Commits must be scanned for credentials, keys and secrets, in plain text or encoded form, and any found must be blocked from being stored in the authoritative source for software.

Commits must be scanned to find credentials, keys and secrets, in plain text or encoded form, and any found must be blocked so they are not stored in the authoritative source for software. Encoded means written in a reversible format such as base64, which hides nothing. Examples are passwords, API tokens, private keys and connection strings. Blocking must happen before storage: a check that only alerts after a commit is stored does not meet it.

Why it matters

A secret stored in a repository is copied to every clone and stays in its history after the file is fixed, where anyone with read access or a leaked copy can find it. Blocking at commit keeps detected secrets from ever being stored.

How to implement

  1. Turn on server-side secret scanning that rejects pushes.

    Use the repository platform's setting that rejects pushes containing secrets, or a pre-receive hook, so a commit holding a credential, key or secret is refused before it is stored. Developer-side pre-commit hooks catch problems earlier but can be skipped, so rely on the server-side check to block.

  2. Set the scanner to catch encoded secrets.

    Turn on decoding of encodings such as base64 and hexadecimal, and add patterns for the organisation's own token formats. If the built-in scanner cannot decode, add a pre-receive hook that can. If a hosted service allows neither, accept pushes only via a scanning server you control. Test with fake credentials, plain and encoded.

  3. Control who can override a block.

    Allow overrides only for a confirmed false positive, by named people, with the reason recorded; a real secret is never pushed through. Give developers a secrets manager to reference instead, as ISM-2142 requires for static credentials used by applications and workloads.

  4. Cover every repository, including new ones.

    Apply the setting at organisation level so new repositories inherit it. Change any secret that got in before scanning began: ISM-2144 requires this for application and workload credentials found stored in the clear, and ISM-1590 for user account credentials.

Keep it running

Keep detection patterns current as new token formats appear, and review overrides for misuse. A secret found in a repository despite the block should trigger changing it and finding out how the scan missed it.

Evidence and audit

  1. Check 1 of 4What an auditor asks for

    Ask for

    A demonstration pushing harmless fake credentials to a test repository in the authoritative source, once in plain text and once base64 encoded, from a client with local hooks turned off.

    Look at

    Whether the authoritative source refuses each push before storing it.

    Good evidence

    Both pushes are refused by the server and nothing from them is stored, even with local hooks skipped.

  2. Check 2 of 4What an auditor asks for

    Ask for

    The scanning settings across the authoritative source, compared with the full list of repositories it holds.

    Look at

    Whether scanning and blocking apply to every repository, including recently created ones.

    Good evidence

    Every repository has commit scanning that blocks on detection, with none switched off or set to alert only.

  3. Check 3 of 4What an auditor asks for

    Ask for

    The log of blocked commits and overrides for a recent period.

    Look at

    Who overrode blocks and why, and whether each overridden item was really not a secret.

    Good evidence

    Every override was made by an authorised person for a confirmed false positive, and no real credential, key or secret was pushed through.

  4. Check 4 of 4What an auditor asks for

    Ask for

    An independent secrets scan, using a different tool, of the content and history of a sample of repositories.

    Look at

    Whether any credential, key or secret committed since blocking began is stored.

    Good evidence

    The independent scan finds no credential, key or secret, in plain text or encoded, committed since blocking began.

Mappings

Closest match in ISO/IEC 27001: A.5.17, Authentication information, which this control partially meets.

ISO 27001

ISO/IEC 27001: 3 mappings

  • A.5.17Authentication informationPartially meets
  • A.8.25Secure development life cyclePartially meets
  • A.8.28Secure codingPartially meets
ASD Essentials

ASD Essentials for enterprise IT: 1 mapping

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.