Skip to main content
Next Defence - Next-Gen AI Cyber Security Firm
Australia & New Zealand[email protected](02) 9064 2614
INSIGHT

University Research Software Builds Need Reproducibility and Secret Separation

A university laboratory publishes source code and notebooks so collaborators can reproduce a research result.

Reproducible analysis can still leak credentials

A university laboratory publishes source code and notebooks so collaborators can reproduce a research result. The repository contains a cloud object-store credential used during an earlier experiment, while its package manifest refers to floating dependency versions. Readers may obtain different computational outputs, and a leaked secret may give access to datasets unrelated to the published paper. These are separate problems—scientific reproducibility and credential isolation—but they intersect in the build pipeline. A safe release should demonstrate that the claimed output can be rebuilt while no reusable production secret travels with the artefacts.

Inventory inputs, code revisions, dependencies, runtime environment, build tooling, data access paths and output checksums. Classify which inputs are publishable, restricted under research agreements or subject to ethics approvals. Reproducibility does not automatically require releasing raw participant information. Where data cannot be shared, publish a synthetic or suitably governed test fixture alongside a documented controlled-access process. Make the publication’s expected analysis outputs and tolerance for numerical differences explicit; the goal is a repeatable method, not a guarantee of identical bytes across every processor architecture.

Draw a boundary between researcher and build service

Student laptops and shared lab workstations should not be able to publish a trusted research artefact solely because their users can push code. Route releases through a controlled build process with recorded commit, dependency lockfile, approved build definition and reviewer. A build service needs narrowly scoped tokens for fetching eligible datasets and writing the final package; it should not inherit a supervisor’s broad storage rights. Provision short-lived credentials where possible and prevent secrets from appearing in printed notebook cells, build logs, container layers or uploaded artefacts.

Check for accidental secrets in repository history as well as the current working tree. Deleting a key from the latest commit does not invalidate copies retained in forks or logs. If an actual credential was exposed, revoke and replace it through the responsible service provider, then review access history within the available logging period. A synthetic secret-scanning exercise can test the detection workflow without planting working credentials. Keep a documented path for researchers to request approved access when a dependency or dataset cannot be mirrored publicly.

Pin dependencies without freezing the lab forever

A reproducible release describes exact packages, hashes where available, compilers, operating-system images and any non-default runtime options relevant to the analysis. Lockfiles improve repeatability but do not prove that every package was trustworthy. Review provenance for downloaded wheels, container images and datasets; prefer sources with reliable release and integrity metadata. Where a workflow depends on unmaintained software, document why, isolate execution and set a migration plan rather than silently changing the method after peer review.

Rebuild the same published analysis from a clean environment without access to the original researcher’s local secrets. Check that dependencies resolve to expected versions, output differences fall within the stated tolerance and no external network request is needed beyond the approved inputs. A second reviewer should be able to execute the procedure using the documented permissions. If results change after a dependency update, preserve the earlier release and produce a new, attributable version instead of overwriting the published artefact.

Account for collaborators and short academic tenures

Research teams evolve during semesters and grants. Make named ownership explicit for datasets, repositories, signing or publishing credentials, and deployment services. When students or visiting scholars leave, remove their access while retaining required research records under the institution’s governance rules. Guest identity lifecycle should be tested against repositories, code-hosting organisations, cloud storage and continuous integration secrets individually. Access removed from a student portal may not be revoked from an independently administered compute service.

Consider the paper’s disclosure pathway. A collaborator may be authorised to see source code but not participant-level data, or to execute a model but not export its training corpus. Separate permissions for code, intermediate artefacts and datasets. Store publication metadata linking each release to approvals, licences and any restrictions. If a public package includes a data loader, ensure its defaults do not point to restricted buckets or reveal internal endpoint identifiers unnecessarily. Clearly mark synthetic examples so readers do not mistake them for real study records.

Verify publication rather than merely generating a badge

Before release, run a clean rebuild, automated secret check, dependency integrity review and constrained-access test. Have an unauthorised synthetic user attempt the restricted dataset path; the expected result is a denial without leakage through verbose errors or debug logs. Preserve build provenance, review sign-off, artefact digest and the reference output. Revisit the release when a material dependency vulnerability or revoked dataset licence changes the assumptions. Publication-grade assurance means the work is reproducible and the release process does not expose resources that were never authorised for public use.

Model the attack through a compromised build dependency

A student submits a notebook using a newly released package version and the build agent fetches a dependency that has been replaced by an untrusted release. The scenario can be exercised with a harmless synthetic package and isolated build environment; there is no need to obtain or execute real malware. The expected control is that the build uses locked, verified dependencies and does not inherit secrets or network access unrelated to the approved publication. Review whether the build process can be altered through an unprotected workflow file or a contributor pull request. Signature and provenance checks only help if their trust roots and verification rules are themselves controlled.

For reproducibility, retain a machine-readable environment specification, versioned inputs and a small reference dataset with expected outputs. Record which calculations are intentionally stochastic and how random seeds or tolerances are handled. When the workflow produces figures for a journal article, connect the published chart to its exact code revision and data transform, so reviewers can distinguish scientific changes from environment changes. A result that reproduces on the original student’s laptop alone does not establish an independent rebuild.

Treat archived access as a lifecycle control

When a grant concludes, public source code may need to remain available while the licensed research dataset moves to a restricted archive. The project owner should identify who can approve new access and who can maintain the publishing pipeline after the original student leaves. Revoke former collaborator credentials across code hosting, cloud projects, data portals and build automation; do not assume the university directory disables every independent service. Keep necessary artefact provenance even when interactive editing rights end.

Review exceptional download requests for raw data separately from routine access to anonymised examples. Ethics approval, consent and licence terms may impose constraints that security testing alone cannot determine. Record where legal or research governance advice is required. The release decision should show both reproducible execution and a constrained path to the underlying data. That protects the integrity of the published work without treating open science as a justification for publishing secrets or unrestricted participant records.

A further control to demonstrate

Repositories should also identify which maintainers can alter a published release after approval. Protect release tags, signing credentials and package registries from a single compromised student account. A corrected analysis should produce a new attributable version, with notes identifying changed code, data or assumptions. Preserve earlier artefacts for reproducibility under the institution’s retention rules, but remove obsolete interactive secrets. This separates legitimate scientific revision from silent substitution of the code and supporting datasets that readers believed they were obtaining.

Final verification detail

Treat an automated analysis report as a derived artefact with its own provenance. Attach the input dataset version, reviewed pipeline identifier and output checksum to the report, rather than relying on the file creation date. If a researcher regenerates the figure with revised code, the new result should be labelled as a new release. That trace allows peer reviewers to identify what actually changed.

Sources and further reading

How Next Defence supports this work

Next Defence can help teams assess reproducible research builds, dependency provenance and secret isolation without publishing restricted research datasets. Engagements are scoped to authorised systems and the organisation’s operational and legal requirements.

Explore Application Security & DevSecOps ↗

LET'S TALK

Let’s talk about your security.

Tell us what you are protecting, where you need greater visibility or what you want to achieve. We will help identify the right next step.

Talk to a Security Specialist

Describe your security requirements. Please do not submit passwords, credentials or confidential incident evidence. This form is not an emergency incident-response channel.

Form powered by HubSpot. Review our Privacy Policy. If the form doesn’t load, email [email protected].