Skip to content
Software development
ASD ISMISM-1536

ASD ISM 1536 Central logging of software database queries and errors

What it says

All queries to databases from software, and any resulting crash or error messages, are centrally logged.

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

In plain English

Every query that software sends to a database, plus any crash or error message it causes, must be logged in the organisation's centralised event logging facility.

Every query that software sends to a database must be centrally logged, along with any crash or error message that results from it. Centrally logged means recorded in the organisation's centralised event logging facility (ISM-1405), not kept only on the database or application server. All queries count, not only failed, slow or sampled ones. ISM-1537 separately covers security-relevant events within databases, such as logons and privilege changes. The ISM applies this to software the organisation develops or commissions.

Why it matters

Without a central record of every query and the errors it caused, SQL injection probing can go unseen, and investigators cannot reconstruct what data was read or changed. Central logging also keeps a copy away from servers a malicious actor may have taken over.

How to implement

  1. List the databases each piece of software queries.

    Take them from the software's connection settings and the database register (ISM-1243), and note the accounts the software connects with, so logging can be set up for each.

  2. Capture every query the software sends.

    Turn on the database's statement or audit logging for all statement types from the software's accounts, or log each query in the software's data access layer. Check the setting covers every statement, not only logons, structure changes, slow queries or a sample.

  3. Log the crashes and errors that queries cause.

    Record each database error message returned to the software and any application crash a query triggers, with the query or a reference that links them.

  4. Forward everything to the centralised event logging facility.

    Send events as soon as possible after they occur (ISM-1983), with the details ISM-0585 lists, such as time, user or process and equipment. For a cloud database service, export its query log there. Where queries hold sensitive values, protect them in the log, as ISM-2052 requires.

Keep it running

Alert when a database or application stops sending query events, and after any logging change compare query counts at the database with the central log. Add logging whenever software gains a new database, account or data access path.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    The software's database connection settings, compared with the list of sources sending query events to the central logging facility.

    Look at

    Whether query events for every database the software connects to reach the central facility.

    Good evidence

    The software's queries to every database it connects to reach the central facility, sent by the database or by the software's data access layer, and none is logged only locally.

  2. Check 2 of 3What an auditor asks for

    Ask for

    A test session in which known actions are performed in the software, with a trace of the queries those actions caused and the central log for the same period.

    Look at

    Whether each traced query appears in the central log with its time, account and query text.

    Good evidence

    Every query in the trace appears in the central log with its time, account and full query text, not as a summary or sample, though sensitive values in it may be masked to meet ISM-2052.

  3. Check 3 of 3What an auditor asks for

    Ask for

    A database error forced in a test environment configured like production, for example by renaming a column the software uses.

    Look at

    Whether the resulting error message, and any crash, reaches the central log and can be linked to the query that caused it.

    Good evidence

    The error message, and any crash it caused, appears in the central log linked to the query that caused it.

Mappings

Closest match in ISO/IEC 27001: A.8.15, Logging, which this control partially meets.

ISO 27001

ISO/IEC 27001: 1 mapping

  • A.8.15LoggingPartially meets
Essential Eight

ASD Essential Eight: 1 mapping

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