Skip to content
meityaicyberPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

Cybersecurity Audit Report Benchmarking Suite (Objective 3)

Implementation of the Cybersecurity Audit Report Benchmarking Suite approved by CERT-In (specification dated 6 October 2026). The Suite evaluates a standardised audit report, produced by Objective 1 (report-to-json) in the master schema v2, against the CERT-In Comprehensive Cyber Security Audit Policy Guidelines (CIGU-2025-0002).

For each report the Suite returns a compliance status (Compliant, Non-compliant or Pending review), the mandatory checks not met with their clauses, the quality score Q, the composite score, every criterion and sub-dimension score, and a full evaluation record. Section references below (for example "Section 6.4") refer to the specification; clause references (for example §16.2(ii)) refer to the Guidelines.

Contents

Path Purpose
src/certin_benchmark/engine.py Algorithm 1: single evaluation pass, compliance status, Q, cap, composite, evaluation record
src/certin_benchmark/mandatory.py MC-01 to MC-21 (Section 5)
src/certin_benchmark/criteria/q1.py to q8.py Quality criteria Q1 to Q8 (Section 6)
src/certin_benchmark/modules.py Engagement modules and their checks (Section 9)
src/certin_benchmark/record_checks.py Record checks (Section 10.1)
src/certin_benchmark/images.py Proof-of-concept images: Objective 1 tags resolved through the image manifest and deep storage
src/certin_benchmark/evaluators/ Sampled distribution scoring and local model backends (Section 4)
src/certin_benchmark/refdata/ Reference Data Package: acquisition, build, signing, import, as-at-date lookups (Section 11)
src/certin_benchmark/refdata/empanelment_pdf.py Conversion of CERT-In's list of empanelled auditing organisations (PDF) into an empanelment set
src/certin_benchmark/refdata/empanelment_register.py Conversion of CERT-In's register of the organisations' AMBAK codes, CERT-In references and validity of empanelment (spreadsheet)
src/certin_benchmark/calibration/ Agreement measures, reference set split, weight, threshold and pass mark fitting (Section 8)
src/certin_benchmark/profile.py The report profile kept in each evaluation record for the analyses over many reports
src/certin_benchmark/analytics/ Analyses over many evaluation records (proposal Objective 3, components B to F): pseudonymised store, peer baselines, anomalies, trends, prediction, impact of a proposed change, synthetic records
config/suite.yaml Weights, cap, thresholds, tolerances, sampling and model settings
curated/ Curated reference lists transferred inside each Reference Data Package (Section 11.1)
tests/ 268 tests, including an end-to-end run on a sample report, a synthetic signed package, a synthetic list and register in the layout of CERT-In's, and the analyses run on synthetic records with known patterns
docs/VALIDATION.md Check of every external fact against the publishers' sites (12, 13 and 16 October 2026) and of the CERT-In documents supplied in October 2026
docs/REPORT_FORMATS.md CERT-In's two audit report formats mapped to the master schema and the Suite's checks, with the fields the schema lacks
tools/ Scripts that re-validate the CVSS reference vectors against the specification and FIRST's calculator
setup.py, MANIFEST.in Build hook that places a copy of config/ and curated/ inside the wheel, for an installed Suite

Installation

Python 3.10 or later. Runtime dependencies are PyYAML, cvss (the open-source CVSS v3.1 and v4.0 calculator), cryptography (Ed25519 signing) and Pillow (to convert proof-of-concept images other than JPEG and PNG to PNG for the vision model). The preparation host also needs pdfplumber to convert CERT-In's list of empanelled organisations and openpyxl to read its register of their identifiers and validity (pip install -e ".[preparation]"); neither is needed inside the environment. The analyses over many reports need numpy (pip install -e ".[analytics]"); evaluating a report does not.

A source checkout, or an editable install of one (pip install -e), reads config/suite.yaml and curated/ from the repository. A wheel carries a copy of both inside the package (setup.py), so an installed Suite finds them without the source tree; --config and --curated override either, and a configuration or list folder that cannot be found stops the command with an error naming the option to use. Inside the CERT-In environment, install from wheels built on a connected host with the same operating system, processor architecture and Python version as the environment:

pip wheel -w wheels .                                         # on the connected host, in the repository
pip install --no-index --find-links wheels certin-benchmark   # inside the environment

pip keeps an installed copy of the same version, so an update built from later code at version 1.0.0 is installed with --force-reinstall added to the second command.

Mistakes in what a command is given, such as a file or folder that is not there, a folder that is not a package, a package that fails verification, a key file of another form or a CWE release list of the wrong form, are reported on one line beginning error:, with exit status 1. A malformed option or date is reported by the argument parser with the command's usage, and exit status 2.

Evaluating a report

certin-benchmark evaluate outputs/report.json --rdp-store /srv/rdp --deep-storage /srv/deep_storage --out record.json
certin-benchmark summary record.json

The command exits with status 2 for a non-compliant report. Options:

  • --rdp or --rdp-store: the imported Reference Data Package, or the store from which the latest is taken. A path that holds no package stops the command; without either option the evaluation runs without reference data, and the record says so.
  • --deep-storage and --image-manifest: where the proof-of-concept images are (see "Proof-of-concept images" below). Without either, the manifest named in report.meta.json beside the report is used.
  • --assets-dir: directory holding proof-of-concept images whose reference is a file path rather than an Objective 1 tag.
  • --overrides: reviewer decisions (Section 2, principle 8), as JSON:
    {"checks":   {"MC-10": {"result": "Fail", "reviewer": "name", "reason": "not declared"}},
     "items":    {"Q5.Cl": {"score": 50, "reviewer": "name", "reason": "jargon in paragraph 2"}},
     "criteria": {"Q3": {"score": 60, "reviewer": "name", "reason": "..."}}}
  • --record-responses file and --replay file: record every model response, and later recompute the evaluation exactly from that record without the model (Section 11).
  • --no-models: run without the language and vision models. Items that need them are not evaluated, and the composite score is designated provisional.
  • --jobs N: evaluate several reports at once, in N separate processes (see "Language and vision models" below).

From Python:

from certin_benchmark import BenchmarkEngine
from certin_benchmark.evaluators import backend_from_config
engine = BenchmarkEngine(refdata="/srv/rdp/RDP-2026-10-12", text_backend=..., vision_backend=...)
record = engine.evaluate(report_json)

Proof-of-concept images

Objective 1 removes every figure from a report before its model reads the pages, stores the image in deep storage under its SHA-256, and writes a tag such as [IMAGE_PAGE_12_FIG_1] in its place. For image evidence the tag is the value of proof_of_concept[].reference, and the image manifest (deep_storage/manifests/<document_id>.json) maps each tag to the stored object. The run report beside the JSON (<name>.meta.json) names the manifest and the document.

For each image entry under Q4.c the Suite:

  1. follows the tag through the manifest to the stored object (by its URI, or by SHA-256 under --deep-storage if storage has moved) and checks that the file still hashes to the manifest's SHA-256;
  2. sends the image itself to the vision model, with the observation it is meant to prove, and rates legibility, relevance to the claim and redaction, five samples each;
  3. for a retest entry, scores retest distinctness 0 without the model where the retest image is byte-for-byte an original image of the same finding; otherwise sends the retest image together with the finding's original images, so the model compares the two.

An entry whose tag is not in the manifest, whose stored object is missing or altered, or for which no manifest was supplied, is not scored: it is referred for human review with the reason, and the composite score is designated provisional. The record lists, for every image entry, the tag, the file used, its SHA-256 and page (reference_values.proof_of_concept_images of Q4).

Language and vision models

Both models run locally at a fixed version behind an OpenAI-compatible endpoint (for example vLLM); see models in config/suite.yaml. Both may point at one server serving one model, for example the model Objective 1 uses. Set model_version to the exact model build so that it appears in every evaluation record; evaluate warns while it is "unset". No backend contacts an external service.

Before the first report, evaluate asks each configured server which models it serves and stops with an error if it cannot be reached or does not serve the configured model, rather than leaving every model-judged item unevaluated. Every request states its own settings, since vLLM fills any setting a request leaves out from the model's generation_config.json:

  • top_p, top_k and min_p (1.0, 0 and 0.0: the whole distribution at sampling.temperature), so that the five samples of an item can differ as Section 4 requires;
  • chat_template_kwargs (enable_thinking: false), which turns off the reasoning trace of models such as Nemotron 3 Nano Omni; a trace does not fit in a rating reply of max_tokens, and any trace that a server returns in the reply is never read as the answer;
  • mm_processor_kwargs, the model's image processing settings, sent with requests that carry images.

The samples of an item are sent together (concurrency, 5), and evaluate --jobs N evaluates several reports at once in separate processes, so that the server can batch requests; the results are the same as one at a time. A server's error message is kept in the note of the item it affected. Images are sent as stored when JPEG or PNG and converted to PNG otherwise (Objective 1 keeps JPEG 2000, TIFF and other formats as embedded in the PDF); the stored file is not changed. A retest comparison sends the retest image with at most max_images_per_request − 1 of the finding's original images (8 in all by default), and the server must accept that many (vLLM --limit-mm-per-prompt).

Every sampled item records its n ratings, distribution, score, variance, one-line rationales, seeds and model version. Report content is passed to the model inside delimiters and the model is instructed to treat it as data.

Reference Data Package

The Suite reads every external source from a dated, signed package (Section 11). Each source is obtained as a complete downloadable dataset and kept as a local knowledge database: the package's SQLite database (reference.sqlite) with its EPSS daily archive and curated lists. No query API is called when the package is prepared, and no external service is contacted when a report is evaluated; the only network connection during evaluation is to the local model server inside the environment.

Source Dataset downloaded From
NVD (current values) JSON 2.0 yearly and modified feeds with .meta files nvd.nist.gov/feeds/json/cve/2.0/
NVD (earlier values) Git history of the NVD mirror (one JSON record per CVE, synchronised every two hours since April 2023) github.com/fkie-cad/nvd-json-data-feeds
CVE List Git repository of CVE records github.com/CVEProject/cvelistV5
EPSS Daily score files from 2021-04-14 epss.empiricalsecurity.com
KEV Catalogue file cisa.gov
CWE Catalogue release files cwe.mitre.org
CERT-In empanelment records List of empanelled information security auditing organisations, with each organisation's snapshot of skills and competence (PDF), converted by rdp convert-empanelment cert-in.org.in (Empanel_org.pdf), or as supplied by CERT-In
CERT-In register of identifiers and validity Spreadsheet of the empanelled organisations with each one's CERT-In reference, AMBAK code and the date up to which its empanelment is valid, converted by rdp convert-register As supplied by CERT-In (not published)
CERT-In advisories Files supplied by CERT-In CERT-In

The workflow:

  1. On the preparation host (outside the CERT-In environment):
    certin-benchmark rdp fetch --staging staging-<date>/ --epss-from 2021-04-14 --nvd-mirror "$PWD/nvd-mirror" \
        --cwe-releases cwe_releases.json                                   # first package
    certin-benchmark rdp fetch --staging staging-<date>/ --previous packages/RDP-<previous> \
        --nvd-mirror "$PWD/nvd-mirror" --cwe-releases cwe_releases.json      # later packages
    certin-benchmark rdp convert-empanelment Empanel_org.pdf --staging staging-<date>/ --set-date <received>
    certin-benchmark rdp convert-register register.xlsx --staging staging-<date>/ --register-date <received>
    # place CERT-In advisories (certin_advisories/advisories.json)
    certin-benchmark rdp build --staging staging-<date>/ --out-root packages/ --previous packages/RDP-<previous>
    certin-benchmark rdp keygen --private keys/rdp-signing.pem --public keys/rdp-signing.pub   # once
    certin-benchmark rdp sign packages/RDP-<date> --key keys/rdp-signing.pem
    
    fetch checks its arguments, the CWE release list and the previous package among them, before the first download. On a later package, --previous starts EPSS on the day after the previous package's last day and NVD history on the day before the UTC date of the mirror commit the previous fetch read; the day of overlap gives the same answers twice, where a gap would lose NVD's changes. Where the previous package holds no EPSS files or no NVD history, --previous fetches that source whole (EPSS from 2021-04-14, the mirror's history from its start), and fetch prints the window it reads. --epss-from and --history-since (read from midnight UTC of the date given) override it. --history-since is never given for a first package. Every file is written anew, as a temporary file renamed into place, so a later fetch never changes a package that shares EPSS files with the staging folder through hard links; a staging folder of its own for each package keeps each package's originals apart. The build validates the CVSS library against 3,264 reference vectors (the whole v3.1 base space and 672 v4.0 vectors; see docs/VALIDATION.md), verifies each source (NVD SHA-256 metadata, KEV structure, full parse, record counts against the previous package), carries forward any source that fails verification, and writes a manifest with retrieval times, publisher versions, file hashes, record counts and EPSS model versions. Each preparation is appended to preparation_log.jsonl. --previous is left out for the first package, and otherwise names a package (a folder holding its manifest). The build refuses NVD history read from a date when it is not given the package that history continues, when that package holds no NVD history, or when the history starts after the UTC date of the last mirror commit that package read; it also refuses NVD history staged without the SOURCE.json that describes it. Where a source's record count legitimately moves outside the expected range of the previous package's, --accept-change <source> accepts it and the manifest records the acceptance; without it the source is carried forward from the previous package. The sources are named nvd, nvd_history, cve_list, epss, kev, cwe, certin_advisories, empanelment and empanelment_register, and any other name is refused. A package is assembled in a hidden folder beside its place and renamed into it once complete. A build that fails therefore leaves nothing behind, and one killed outright leaves only its hidden folder (.RDP-<date>.partial), which the next build of that date removes. Temporary files left by an interrupted download (.<name>.part) are not copied into the package's originals. Packages built from the test fixtures hold synthetic empanelment records and are never named as --previous of a package for use.
  2. Transfer on write-once media or through the approved unidirectional mechanism.
  3. Inside the environment:
    certin-benchmark rdp import RDP-<date> --store /srv/rdp --key public.pem
    
    Import verifies the signature and every file hash, rejects unlisted files, and never overwrites an existing package. It copies the package into a hidden folder of the store and renames it into place once complete, so an interrupted import leaves nothing that could be taken for the latest package.

convert-empanelment writes empanelment/set_<date>.json with the PDF beside it, never overwrites an earlier set, and prints warnings for review. The list carries no date of its own, so the set is dated by the PDF's modification date unless --set-date (YYYY-MM-DD) gives the date the list was received. The converter reads each snapshot's section 7 table of named technical manpower, including rows the PDF's table structure leaves outside the table found on the page, people whose cells the document's merged cells divide into several rows, table bodies drawn offset from their headings, and words into which the PDF draws a stray space. Its warnings name, for review: snapshots that list no manpower (or give designations in place of names), directory entries without a snapshot, organisations with more than one snapshot (each kept with its date of declaration), section 7 serial numbers that are not in sequence, snapshots whose section 7 names more people than section 6 counts, and names that look divided inside a word. Every set received is kept: a set held in the previous package and no longer staged is carried into the new one, so that the set in force on any earlier release date can still be applied, and the record count is checked for the latest set against the previous package's latest set.

convert-register writes empanelment_register/register_<date>.json with the spreadsheet beside it, and never overwrites an earlier register. It finds the heading row by its headings (S.No., Code(Reference), AMBAK Code (Primary), Organisation Name, Empanelment Validity, and common variants; where two columns name the AMBAK code, the one marked Primary), fills merged cells, reads dates written as dates, as Excel serial numbers or as text, and keeps the former or other names a row gives ("Formerly ...", "Now ..."). It warns of a CERT-In reference or AMBAK code given to more than one row, a cell holding something other than one AMBAK code, an AMBAK code of another length than most or whose month is not 01 to 12, and rows without a code or a validity date, which are kept. Each row is numbered by its row in the sheet, with the sheet's own S.No. beside it. The register is dated by the day the spreadsheet was last saved, in India Standard Time (the workbook records the time in UTC), unless --register-date (YYYY-MM-DD) gives the date it was received. The build keeps every register received, as it keeps the sets, and links each row to the organisation of each set that it names, by name, former or other name, or, for a row whose name links to none, by the AMBAK code of a row of another register already linked; the manifest records, for the latest register and the latest set, the rows linked (and how many by AMBAK code) and any row naming no organisation of the set, or several. The register of 16 October 2026 links one to one with the 236 organisations of the list of 5 October 2026.

The first fetch clones the NVD mirror with its full history and reads it once, which is the slowest step of the first preparation; later preparations update the clone and read only synchronisations since the previous package, whose history rows are carried into the new one. Read from a date, the history also marks each record whose first state in the window lacks a value of some version; the build records that NVD removed the value only where the earlier packages held one. Before the mirror's values are used, the build compares the mirror's latest value of every CVE with NIST's own feed wherever both carry the same lastModified time; if more than 0.1% differ, the mirror's history is not used in that package. The comparison is recorded in the manifest.

Lookups follow Section 11.3: EPSS from the daily file for the reference date; KEV by date of addition; NVD scores from the NVD state in force on the reference date (each value holds from the record's lastModified date, from NIST's feeds or the mirror's history), and NVD CWE assignments from the latest package on or before the reference date; CWE validity from the catalogue in force on the date; advisories issued on or before the date; empanelment records from the set in force on the release date (by the identifier the report states, through CERT-In's register where it is an AMBAK code or CERT-In reference, or by the organisation's name; where an organisation has declared its manpower more than once, the declaration made on or before the release date); the organisation's identifiers and the validity of its empanelment from the register in force on the release date (the latest dated on or before it, else the earliest).

The format of the advisories file is defined in src/certin_benchmark/refdata/build.py, the empanelment set is the format written by src/certin_benchmark/refdata/empanelment_pdf.py, and the register the format written by src/certin_benchmark/refdata/empanelment_register.py; an advisory's issued_on is a date of the form YYYY-MM-DD. rdp keygen creates the Ed25519 key pair once: it creates the key's folder where needed, open to its owner alone, writes the private key readable by its owner only, and never replaces an existing key, since packages signed with it would no longer import. It refuses one path for both keys and a path already taken, a broken link included, and warns where an existing folder of the key can be read by others.

Calibration (Section 8)

certin-benchmark calibrate split --strata strata.csv
certin-benchmark calibrate agreement --records suite_records/ --experts experts.csv --retest retest_records/
certin-benchmark calibrate fit-weights --records suite_records/ --experts experts.csv

The agreement report gives Cohen's kappa and precision of Fail per mandatory check, ICC(A,1) per criterion against the inter-expert bound, quadratic weighted kappa per language-model sub-dimension, Spearman correlation for the composite and test-retest ICC, each against its acceptance target. all_targets_met is true only when every measure is present and met. A check that misses its targets is placed in referral_mode_checks in config/suite.yaml.

The pass mark

certin-benchmark calibrate fit-pass-mark --records suite_records/ --experts experts.csv --split split.json

The pass mark for Q is set from the expert panel's judgement of the same reports. Besides the item scores, each expert records an overall judgement of each report in the expert table, as the item judgement with the value acceptable, borderline or not acceptable ("unacceptable" is read as not acceptable). Two judgements that differ are adjudicated by a third expert, as a mandatory verdict is. The mark is fitted by the contrasting-groups method: the cut on Q that misclassifies fewest of the reports judged acceptable or not acceptable (reports at or above the cut pass; where several cuts do equally well, the middle of the longest run of them), with a 95% interval from resampling the reports. The median Q of the reports judged borderline is given beside it as a cross-check (three or more such reports needed). With --split (the output of calibrate split), the mark is fitted on the calibration portion and its agreement with the experts is measured on the held-out portion. Like the weights, the mark is proposed to CERT-In for approval and then recorded in the configuration.

Analyses over many reports (components B to F)

The Suite scores one report at a time. certin-benchmark analytics reads the evaluation records it writes and analyses them together, as the proposal's Objective 3 describes under similar cases (C), anomalies (B), trends (D), prediction (E) and adaptive benchmarks (F). The commands need numpy and contact no service.

certin-benchmark analytics load records/ --store /srv/analytics/store.sqlite --key /srv/analytics/keys/pseudonym.key
certin-benchmark analytics versions --store /srv/analytics/store.sqlite
certin-benchmark analytics baseline --store /srv/analytics/store.sqlite --since 2025-07-25 --out baseline.json
certin-benchmark analytics outliers --store /srv/analytics/store.sqlite --baseline baseline.json --threshold 60
certin-benchmark analytics trends --store /srv/analytics/store.sqlite --period quarter
certin-benchmark analytics predict --store /srv/analytics/store.sqlite --backtest
certin-benchmark analytics predict --store /srv/analytics/store.sqlite --key /srv/analytics/keys/pseudonym.key new/*.json
certin-benchmark analytics impact reports/*.json --proposed proposal.yaml --rdp-store /srv/rdp --replay responses.json

Each command writes JSON to the screen, or to the file named by --out. A part of an output that the evaluations cannot support (a trend from fewer than 20 reports, for example) says why in place of its result.

The store. load keeps each evaluation in a local SQLite knowledge database, one row for each report and configuration, with its checks, criteria, criterion components and findings in tables of their own. As the proposal's data handling requires, the auditing organisation and the report are kept only as pseudonymous tokens: each token is an HMAC-SHA256 of the identifier under a secret key, so the same organisation always receives the same token and only the holder of the key can tell which organisation a token stands for. An organisation is identified by its AMBAK code and by its identifier in the empanelment set (derived from its name, and the only one before CERT-In's register is held); an evaluation that gives both ties them to one token, so an organisation keeps its token when a newer package adds the register or when it changes its name. A report is identified by its own identifier together with its organisation's, since each organisation numbers its own reports, by its source file together with its identifier, and by its source file alone, unless two evaluations with the same file give different report identifiers or organisations (one file can hold several reports). A report keeps one token however often it is evaluated: the same file evaluated against a newer package, in which its organisation is identified differently or not at all, is the same report, as is a later version of the report under the same organisation and number. Of two evaluations of one report under one configuration the store keeps the one of the later report date, and of equal dates the one loaded last, whatever the order of loading. No name, identifier or free text from a report enters the store: the descriptive fields are kept only as values of their controlled lists (see the report profile below), and a finding by its position in the report rather than its identifier.

load reports the evaluations it added, those that replaced an earlier evaluation of the same report, those not loaded because the store holds a later version, the files it skipped and why (a file it skips changes nothing), the values it recorded as "Other", and the store's numbers of evaluations without a usable report date or with provisional scores. Records evaluated with a package whose curated lists are newer than the Suite's own are loaded with --rdp, --rdp-store or --curated, so that a sector or audit type the package adds is kept.

The first load creates the key, readable by its owner only, and says so. The key is never replaced: the store records a fingerprint of it and refuses any other key, and a store that holds records refuses to create a new one, since a new key would give every organisation a new token. Reading the store needs no key; giving a new record its tokens (predict on new records, impact --store --key) does. No output places a token beside the identity it stands for.

Every analysis reads the evaluations of one configuration of the Suite (--digest, by default the configuration with most evaluations), since scores from different versions of the benchmark are not comparable. It leaves out provisional evaluations, whose scores are not final (models not run, items not evaluated, or Pending review), unless --include-provisional is given, and evaluations without a report date. Reports of different years are compared by scoring the archive again under one configuration.

Each evaluation record carries a report_profile for these analyses: the report's date (the release date, else the end of the assessment), its audit types and the first of them that the Guidelines enumerate (the engagement type), the report's status, the auditee's sector and type of entity, the number of assets and findings, the number of findings of each severity, and the severity and status of each finding. Its descriptive fields take values from controlled lists only (the enumerated audit types and the controlled list of sectors in curated/, and the values master schema v2 allows for the type of entity, the report status and a finding's status); any other value is recorded as "Other", since a free-text field of a report can hold the auditee's name.

C, similar cases (baseline). A report's peers are the reports of the same engagement type, sector and size (assets in scope: 1, 2 to 5, 6 to 20, more than 20) in the baseline window. Where that group holds fewer than 20 reports, the comparison falls back to the engagement type and size, then the engagement type, then all reports, and states the group used. The baseline is saved as a file that records the configuration and the window it was built from, so later reports are compared with a fixed reference rather than one that moves with every report added. A window from 25 July 2025, the date the Guidelines took effect, compares reports with reports written to the same rules.

B, anomalies (outliers). A report is flagged where its Q lies more than three robust standard deviations below the median of its peers, or below the median of its agency's other reports, on the logit scale. Against its own agency, the distance is measured in a spread common to all agencies, since the spread of an agency's four or five reports is too uncertain to measure by. Each agency's level is estimated with partial pooling (a normal random-effects model with the DerSimonian-Laird variance between agencies), so that an agency with two reports is drawn towards the average, and each agency is placed against funnel limits at 95% and 99.8% that allow both for its number of reports and for the normal spread between agencies. --threshold (for example the pass mark) gives each agency's probability of a level below it. Each mandatory check is listed with its failure rate, flagged where it almost never fails (it no longer separates reports) and where its failure rate changed, with the date found by binary segmentation. Pairs of checks that fail together, and checks whose failure goes with a low criterion score, are listed by the strength of their correlation.

D, trends (trends). The command gives the scores of each period with their intervals, and the trend of the logit quality score with a step at each known break (by default the date of the Guidelines; --break adds others and --no-breaks removes them), adjusted for engagement type, sector and size. The trend is given for the average report and within agencies, since the average report also moves when agencies of different levels submit more or fewer reports. A term the reports cannot estimate is left out and named under not_estimable: a break with fewer than 10 reports on either side (as in a window that lies wholly after it), or a term the others determine, such as a size that does not vary. Each agency's trend is measured relative to all agencies and flagged improving or declining by the Benjamini-Hochberg procedure, which holds the expected share of agencies flagged without a trend at 5%. Changes in an agency's level are found by binary segmentation. For every agency with 12 or more reports, a self-starting CUSUM gives the dates on which a monitor would have raised an alarm: each report is compared with the mean of the agency's reports before it since the last alarm, allowing for the uncertainty of that mean, so that no level is taken from hindsight. Since the residuals come from a model fitted to all the reports, these dates show where the rule would have signalled, not exactly what live monitoring would have known at the time.

E, prediction (predict). The expected quality score of a report, with 80% and 95% intervals, and its probability of non-compliance, from its engagement type, sector, type of entity, size, findings and date, and from its agency's record before the report. The score is modelled by ridge regression on the logit scale and non-compliance by penalised logistic regression, the strength of each penalty chosen by cross-validation. Each new report is predicted from the evaluations dated before it, never from its own evaluation or from later ones. --pre-audit uses only what is known before the audit. --backtest fits the model on every earlier report, quarter by quarter, predicts the next quarter, and compares it with the population mean, the agency's mean and the agency's last score; the model is worth using only where it beats them. A prediction is an expectation from history, for planning and for choosing reports to review, and never a score of a report.

F, adaptive benchmarks (impact). The benchmark does not adjust itself. A change to the configuration (weights, the cap, thresholds, tolerances or curated lists) is written in a YAML file in the form of config/suite.yaml holding only what changes (--proposed), or as a folder of curated lists (--proposed-curated). impact evaluates the reports given under the current and the proposed configuration and reports the changes of compliance status, of Q and the composite score, and of each criterion and check. With --store and --key (the key is checked against the store's), reports and agencies are named by their tokens and the changes of status are counted by agency; without them reports are named by their identifiers and no organisation is named. The model-judged items a change leaves without a recorded response are counted by sub-dimension (such as Q4.d), since an item's own identifier can carry a finding's identifier or a person's name. With --replay, the responses recorded when the reports were evaluated (evaluate --record-responses), model-judged items are recomputed wherever the change leaves their prompts as they were, and an item whose prompt changes is listed as needing the model; without it the reports are evaluated without the models, and the output says so. CERT-In decides on the change, and an adopted change becomes a new version of the configuration, under which the archive is scored again. The pass mark is fitted with the calibration (see above).

Synthetic records. Until the archive of 850 reports is scored, analytics synth --out folder writes synthetic evaluation records in the archive's shape (850 reports from 120 agencies with very unequal numbers of reports, from April 2022 to September 2026) with known patterns built in, and their ground truth (truth.json). Every identifier is invented (report identifiers SYN-nnnnn, AMBAK codes beginning 2099, "Synthetic Audit Agency nnn"), and the records carry the flag synthetic and a configuration digest of their own (synthetic-...), so that they are never analysed together with real evaluations. On the default records (seed 7) the analyses find the following, and the tests check each:

  • five of the six reports planted far below their agency and their peers, with six other reports flagged among 813 usable evaluations (after the noise of its criteria, the sixth lies less than three spreads below its peers);
  • the check that almost never fails, and the rise of another check's failure rate from 4% to 30% on 1 October 2024 (found from 17 October 2024, 4.4% to 29.7%), with no change found in any other check;
  • the check made to fail with low CVSS accuracy, as the strongest correlation with a criterion (Q7, −0.44);
  • the step at the date of the Guidelines, 0.39 on the logit scale (0.40 planted);
  • the improving and the declining agency, and the agency whose level drops, with none of the other 33 agencies flagged; the drop found from 23 September 2024 (1 November 2024 planted), and the CUSUM's alarm for it on 12 December 2024;
  • on records without the drop and the planted slopes, a trend within agencies of 0.10 a year (0.12 planted), no agency's trend flagged, and no CUSUM alarm for any of the 15 agencies with 12 or more reports;
  • in the backtest over 601 reports in 13 quarters, a mean absolute error of 8.4 score points against 9.7 for the best baseline, a Brier score for non-compliance of 0.243 against 0.251, and 92% of scores within the 95% intervals.

These show that the methods find patterns of the size planted in data of the archive's size; what the archive itself shows is known only once it is scored.

Status of the curated lists

Every name, date and identifier format in curated/ was checked against the issuers on 12 October 2026, and the CERT-In documents supplied in October 2026 against CERT-In's site on 16 October 2026 (docs/VALIDATION.md). From those documents:

  • the requirements of the CERT-In Directions dated 28 April 2022 are now the rows of CERT-In's document on methods of verification (file dated 22 March 2024), each with its method of verification (curated/regulatory.yaml); CERT-In's link to the document still returns "not found", so the copy supplied by CERT-In is the source;
  • the Cyber Security Audit Baseline Requirements (NSCS-46-16 Rev 1.0) are recorded with their 68 markers in six categories and the markers recommended rather than mandatory for medium and low risk infrastructure (curated/frameworks.yaml);
  • the CERT-In Guidelines for Secure Application Design, Development, Implementation & Operations (version 1.1, updated January 2024) are recognised as a supporting framework (§8(vii));
  • the list of empanelled organisations is converted into the Reference Data Package (see above), replacing the synthetic records.

From the register and the report formats CERT-In supplied on 16 October 2026:

  • CERT-In's register of the organisations' AMBAK codes, CERT-In references and validity of empanelment (16 October 2026) is converted into the Reference Data Package and read by MC-10 (items 20 and 24 to 26);
  • CERT-In's audit report formats for compliance / regulatory audits and for technical security assessments are mapped to the master schema and the Suite's checks in docs/REPORT_FORMATS.md; the overall rating scale of their executive summary is in curated/report_formats.yaml and read by Q5 (item 27).

The following remain provisional until CERT-In supplies or confirms them:

  • the 282 control points of the MeitY Comprehensive Audit Program Checklist, which is not published (empty; MC-07 counts distinct assessed identifiers until the list is supplied);
  • the controlled list of sectors and the mandatory regulations for each, which carry the dates they are in force (the RBI Directions of 31 July 2026 and the CEA Regulations, 2026 change the banking, NBFC and power entries), and the two sectors added for rows 3 and 4 of the methods of verification;
  • the designation lists for mid-management, the head of an organisation and prohibited categories, and the mapping of qualifications to engagement modules;
  • the CERT-In advisories file and auditee feedback, which are not yet supplied;
  • the register's AMBAK codes, references and validity dates, which CERT-In does not publish and which therefore cannot be checked against its site, in particular one reference given to two organisations and one AMBAK code of a form unlike the others (docs/VALIDATION.md).

Interpretations for confirmation with CERT-In

The specification leaves the following points open. The code takes the reading stated here; each is a configuration or a single function and can be changed on CERT-In's direction.

  1. MC-08 and MC-10. Fail is returned automatically only where a required signature is absent. Every determination about a person (membership of the audit team, mid-management designation, head of organisation, declaration in the empanelment records) returns Indeterminate and becomes Fail on the reviewer's confirmation through --overrides. MC-09 treats a signatory's role mismatch the same way. See also item 20.
  2. MC-13 and the web and mobile modules do not require a version and hash for an asset recorded as inaccessible under MC-11.
  3. MC-14 also requires the current report_version to appear in the version history.
  4. MC-19 requires notified_on and fails where it is later than the assessment end date.
  5. MC-01 accepts a severity of None or Informational for a CVSS score of 0.0.
  6. MC-05 treats the Cyber Security Audit Baseline Requirements as a comprehensive framework, and NIST SP 800-115, PTES and the CERT-In Directions as supporting methodologies that do not satisfy MC-05 on their own.
  7. Q1. Where no tool is named in the proof-of-concept descriptions, tool disclosure is measured over the declared tools. The duration item is met by assessment dates or man-hours.
  8. Q2. "Not applicable" with a reason scores 100, except on the requirements of the methods of verification (item 19), where it scores 50 if the requirement applies to the auditee and is otherwise not scored. A non-compliant sector entry without linked findings is limited to 50. Where the sector is not stated, R is excluded and the report is referred.
  9. Q3. The expertise denominator is the members recorded as in the audit team. Components are renormalised before the D_pro deduction. A trainee counts as a fresher.
  10. Q4. Substantive text is at least three words. The executive summary's asset reference for a finding is counted among that finding's asset references. Evidence declared redacted scores 100 on redaction without assessment. A retest captured on or before the original evidence scores 0 on distinctness without sampling.
  11. Q6. Plausibility variance is measured on the inferred CVSS rating band (0 to 4) against the same v_max.
  12. Q7. P_d is the share of the day's scores at or below the reported score, as FIRST defines its percentile. CWE parent or child means a direct ChildOf relation in view 1000. An observation with no evaluable check is left out of the mean.
  13. Q8. A category excluded with a reason is not penalised under CA (Section 6.8, final paragraph), since the schema does not record who made the exclusion.
  14. Section 10.1. An obligation is reported Pass, Fail or Not recorded. A missing conference or Board presentation date is Not recorded.
  15. Sampling. v_max = 0.8 and a minimum of three valid ratings are initial values for calibration.
  16. NVD values before the earliest recorded state. NVD's value on a date is known only from the earliest state recorded for that CVE: the record's lastModified date in the mirror's first synchronisation (24 April 2023) or in NIST's feed. For an earlier date the Q7 CVSS accuracy check of that CVE is not evaluable and is excluded, as Section 6.7 provides for a check with no authoritative value. Reports with observations from 2021 and 2022 are affected where NVD changed the record after the observation.
  17. NVD mirror. NVD's earlier values come from Fraunhofer FKIE's mirror of NVD records rather than from NIST, since NIST's CVE feeds carry only each record's current values and its change history is served through a query API. The build checks the mirror against NIST's feed before use (see the Reference Data Package). CERT-In's acceptance of the mirror as a source under Section 11.2 is to be confirmed.
  18. CVSS v4.0 rounding. Scores that are exact halves (522 of 104,976 base vectors) are rounded half up, as the cvss library and Red Hat's corrected reference calculator do. The August 2024 calculator snapshot in FIRST's GitHub organisation gives 0.1 less for these vectors.
  19. Directions (Q2, D). The requirements "as enumerated in the CERT-In document on methods of verification" are its rows 1 to 5: NTP synchronisation (Direction (i)), incident reporting within 6 hours ((ii)), subscriber records of data centre, VPS, cloud and VPN providers ((v)), KYC records of virtual asset service providers ((vi)) and logs kept for 180 days ((iv)). The two numberings differ (row 3 is Direction (v), and Direction (iii) has no row), and reports use both, so an entry is assigned as follows. An identifier that names its numbering ('MoV-3', 'DIR-v', 'Row 3', 'Direction 5') is followed, unless the entry's text matches another requirement best, when the entry is referred with both. Otherwise the text decides where one requirement matches best; failing that, a number that means the same in both numberings (1 and 2, or i and ii). A number from 3 to 6 alone, Arabic or Roman (including 'S. No. 3', usually the report's own serial number), or text that matches two requirements equally, is referred to the reviewer, and the rows it may be are left unscored rather than scored "not assessed". Rows 3 and 4 apply to the auditee where its sector or name establishes that it provides those services, or where the report assesses them (compliant, partially compliant or non-compliant); where neither, they are not scored, and an entry recording them "Not applicable" or "Not assessed" is noted without credit or penalty. "Not applicable" on a row that applies (rows 1, 2 and 5 always) scores 50 with a deficiency. Row 6 (the requirements communicated to the auditee and included in the report) is met by the verification in the report itself (MC-06). Direction (iii), the Point of Contact, has no row: an entry for it is accepted but not scored. The requirement and the methods of verification of each row, word for word, are given to the language model when it judges whether an entry's evidence relates to the requirement.
  20. MC-10 and CERT-In's list. CERT-In's list gives no identifier, no period of validity and, for most organisations, no designations (the converted list of 5 October 2026 has designations for 165 people in 8 organisations); CERT-In's register supplies the identifiers and validity (items 24 and 25). Without an identifier the register holds, the organisation is found by name: exact after normalisation of case, "M/s", punctuation and legal-form words, against every name under which the list shows it, or under which the register gives it (item 25). A name that does not correspond exactly, or corresponds to more than one organisation, returns Indeterminate with the closest names in the list. A person is found by exact name after normalisation of case, dots, hyphens, leading honorifics and service ranks (Mr, Mrs, Ms, Dr, Shri, Smt, Sri, Kumari, Er, Col., Lt., Maj., Cdr., "(R)") and the numerals some lists set after a repeated name ("Amit Kumar 2"); other punctuation, initials and spellings are compared as written. "Valid" is read as listed in the set in force on the release date and, where a register is held, within the validity the register in force records (item 24). Where an organisation's snapshot lists no manpower (marked confidential, in an annexure not in the list, or designations given in place of names), MC-10 returns Indeterminate. MC-08 relies on the designations stated in the report.
  21. Q3 (EX) and declared qualifications. Where the credentials a report states for a member do not establish expertise for the declared audit types, the qualifications declared for that member to CERT-In are read (Section 11.1), and expertise_source in the record says which was used. They are not read where the list declares more than one person of that name with different particulars, and the record notes a declaration dated after the release date. Credentials stated in the report but not among those declared are noted for the reviewer and do not reduce the score.
  22. Module checks added from CERT-In's documents. Five checks not in the table of Section 9 are applied under Q8 (MD), each recorded with its basis and flagged as pending confirmation. Where an application is audited (an application audit type is declared, or a web, mobile or API asset is tested): compliance with CERT-In's Guidelines for Secure Application Design, Development, Implementation & Operations is assessed, each practice with evidence and each "Not applicable" with a reason (key recommendation iv; the guidelines are the document §8(vii) names); the certificate identifies the certified applications with version and hash, and gives its date (vi; §9.5(i), §16.1(v)); where production was not tested, the certificate states that the audit was not conducted on the production environment (x; §16.3(v) asks the same of the final report, which MC-12 checks); and the certificate is issued on or after the end of revalidation (x). In every compliance audit, the Baseline Requirements are assessed: each of the 50 markers mandatory for every risk profile has an entry with a compliance status, read as one check (Tables 2 to 4; §8(iii); Section 9 expects the Baseline under every module). Removing them from curated/modules.yaml applies the table of Section 9 alone.
  23. Baseline markers. The report does not state the auditee's risk profile, so the Baseline check requires the 50 markers mandatory for every profile. The other 18 are mandatory for high risk infrastructure, and 12 of them for medium risk; if CERT-In wishes, the profile can be added to the schema and the check made to follow it.
  24. Validity of empanelment (MC-10). The register gives the date up to which each organisation's empanelment is valid, not the date from which it runs. MC-10 applies the register in force on the release date (on the assessment end date where no release date is stated, as the record says). A release date after the date it records is referred with that deficiency, naming any later register that records a renewal, whose date of renewal it does not give. Where the register in force no longer holds an organisation that an earlier register held, the latest earlier register is read: a validity that ended before the release date is referred as above, and one that had not ended is referred as an organisation dropped from the register. Each becomes Fail only on the reviewer's confirmation, since Section 5 allows MC-10 to fail only so. For a release date before the earliest register held, the earliest is applied and noted; it says when the empanelment ends, not when it began. An organisation that no register up to the release date holds is noted, without a deficiency. Where a register lists an organisation more than once, its identifiers are read from the row whose code the report states (else the row valid longest) and its validity from the row valid longest, and this is noted.
  25. Identifiers (MC-10). certin_empanelment_id is read as the set's own identifier, an AMBAK code or a CERT-In reference, with or without words such as "AMBAK Code:" or "CERT-In" before it. A reference is compared by its letters and numbers in order, ignoring case, the spaces and punctuation between them and leading zeros ("RE-2099-07" and "RE 2099 7" are the same; "F2099002" is not "F-2099-002"). A code one register gives to more than one organisation identifies none, and the organisation is then found by name; across registers a code is taken to stay with its organisation unless rows of different registers are linked to different organisations of the set. An identifier and a name that denote different organisations are referred, including an identifier of an organisation the set in force does not list. Where the identifier finds the organisation and the name does not correspond to the records, the identifier is followed and the name noted. A name the list does not show but the register gives, a new name or a former one, finds the organisation through the register (the register of 16 October 2026 gives one organisation's new name, with the former name under which the list of 5 October 2026 shows it). The evaluation record carries the organisation's AMBAK code and reference (auditing_organisation), by which Objective 4 can group an agency's reports.
  26. "Listed on CERT-In Website (Y/N)" (MC-10). CERT-In's report formats ask for this column in the audit team table; master schema v2 has no field for it, and the Suite reads auditing_team[].listed_on_certin_website where Objective 1 supplies it, beside the records and never in their place. A person the report itself marks "N" and the records do not list is referred with that statement; one marked "Y" and not found is referred, the deficiency saying so; one marked "N" but declared is noted. Where the records cannot be read for the organisation, the persons the report marks "N" are noted. A value extracted below the confidence threshold is not read, and does not hold MC-10 back.
  27. Overall rating (Q5, K). CERT-In's report formats rate a report on four levels (Well Controlled / Strong, Adequately Controlled / Moderate, Needs Improvement / Weak, Unsatisfactory / Critical) with severity criteria for each. K is also set to 0 where the stated rating is better than the Critical and High findings not closed allow: none for Strong; no Critical and at most two High for Moderate; no Critical and at most five High for Weak. A rating is recognised by the level's words ("Medium" for Moderate), or as " risk". It is not compared where it names two levels in any way ("Moderate to High"), is a bare "High" or "Low" (which do not say which way the scale runs), or carries a negation ("Not Strong"); nor where a Critical or High finding states no status, or a severity or status was extracted below the confidence threshold. A status beginning "Closed" is closed, and C and H are read as Critical and High. The criteria on Medium and Low findings, systemic failures and repeated issues overlap between levels and are left to judgement. Section 6.5 defines K by the summary table and counts alone, so this addition is pending CERT-In's confirmation; apply_in_q5: false in curated/report_formats.yaml removes it.

Known limitations

  • Image proof-of-concept entries need Objective 1's deep storage (or the image files) and a vision model. Without them those entries are not evaluated and the composite score is provisional.
  • CWE validity as at a past date depends on every CWE release since that date being staged; rdp fetch --cwe-releases takes the list.
  • The KEV catalogue is checked against the required fields and patterns of CISA's published schema in code rather than with a JSON Schema validator, to avoid a further dependency.
  • rdp fetch needs git on the preparation host. Inside the CERT-In environment git is not needed.
  • rdp fetch stops at the first file that still cannot be downloaded after four tries, leaving the later sources unfetched, and a rerun downloads every source again (with --no-history it keeps NVD history already extracted).
  • Engagement module checks for third-party certificates, network devices, pipelines and forensics use curated keyword lists in curated/modules.yaml.
  • The empanelment converter reads the layout of CERT-In's list as published in October 2026 (a directory, then a snapshot per organisation in thirteen numbered sections, the manpower in section 7). On that list it reads every snapshot's people as the list numbers them, and the names and particulars checked against the PDF are read correctly (docs/VALIDATION.md); a name the list breaks inside a word across two lines of its cell is read as written there, with a warning. A different layout may be read wrongly without a warning; the warnings (serial numbers out of sequence, more people named than counted, names divided inside a word) catch most such errors, and the people read should be checked against the list before a new layout is relied on. A person listed in an annexure that is not in the PDF, or under an organisation whose manpower is marked confidential, cannot be verified and leaves MC-10 Indeterminate.
  • Manpower names are compared as written, apart from the normalisation above. A person listed under a different spelling or with initials expanded is referred for review rather than matched.
  • The register's identifiers and validity are taken as CERT-In supplies them: CERT-In does not publish them, so they could be checked against its site only for the organisations' names (docs/VALIDATION.md). The register gives no date from which an empanelment runs.
  • The analyses over many reports have been run on synthetic records only. Their settings (the peer group size of 20, the cut of three robust standard deviations, the false discovery rate of 5%, the penalties of segmentation) are initial values, to be reviewed on the scored archive. An agency's report count in the archive is small for many agencies, so most agency estimates are drawn strongly towards the average.
  • An organisation that gives two different reports the same number has them treated as versions of one report, and only the later is kept; the count of replaced evaluations in the output of load shows where this may have happened.
  • An AMBAK code that CERT-In's register gives to two organisations would tie them to one token in the store; the register's converter warns of any such code, and it is to be corrected in the register before the archive is loaded.
  • The analyses group reports only by values of the controlled lists. A report whose sector, type of entity or audit type Objective 1 writes in other words is grouped as "Other", so the share of "Other" in the store is worth watching once the archive is loaded.

Tests

python3 -m unittest discover -s tests -p 'test_*.py'

tests/test_analytics.py runs the analyses on synthetic records with known patterns and checks that each finds what was planted and nothing that was not; the tests that need numpy are skipped where it is not installed. tests/fixtures/staging.py builds a synthetic package (NVD, a miniature git repository in the layout of the NVD mirror, CVE List, EPSS, KEV, CWE, advisories, and empanelment records in the converter's format) that is signed and imported before the tests run. tests/fixtures/sample_report.json is a complete master schema v2 report. tests/test_certin_documents.py builds a small list in the layout of CERT-In's PDF with reportlab and converts it; the test is skipped where pdfplumber or reportlab is not installed. No real CERT-In list is held in the repository.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages