Safeguard
Supply Chain•

How do you find every prompt and dataset in your repositories?

A practical sweep to list prompt templates and dataset files across repos: where to look, what to search for, and how to turn the list into owned records.

Safeguard Security Team
4 min read

To find every prompt and dataset, search repositories for prompt files and long string constants near model calls, search for data file extensions and download scripts, check object storage and notebooks, then record each hit with an owner. Expect the first sweep to surface items nobody remembered.

Why a sweep first

You cannot review, version or retire what you have not listed. Prompts and datasets are scattered because they are easy to create: a notebook here, a folder of CSV files there, a string in a handler. A one time sweep gives a baseline that the ongoing process then maintains.

Where prompts hide

  1. Prompt folders and text files. Names containing prompt, system, instructions or template.
  2. String constants beside model calls. Search for the client library calls your teams use, then read the arguments around them.
  3. Configuration files. YAML or JSON with a long text field.
  4. Notebooks. Experiments that quietly became production.
  5. Database or config service seeds. Migration files that insert prompt text.
  6. Chat templates. Jinja files shipped with downloaded models. See model chat templates are Jinja files.

Where datasets hide

  1. Data folders. Common extensions include CSV, JSON and JSON lines, Parquet, Arrow and text files, which are formats the Hugging Face Datasets documentation lists as supported.
  2. Download scripts. Code that fetches data from a URL at build or run time.
  3. Object storage buckets used by training and indexing jobs.
  4. Retrieval sources. The folders, wikis and sites your indexer reads.
  5. Evaluation sets. Easy to forget, and they shape model choice.
  6. Cached copies. Dataset caches on developer machines and build agents.

Run the sweep in four passes

PassActionOutput
1. SearchPattern search across all repositoriesRaw list of candidates
2. TriageRemove false hits, merge duplicatesCleaned list
3. InterviewAsk owning teams what the rest areMissing items
4. RecordAdd each item to the inventoryOwned entries

The interview pass is not optional. Search finds what is in code. People know about the spreadsheet on a shared drive that feeds a nightly job.

What to record for each

For a prompt: name, owner, location, origin, untrusted inputs, whether it grants tools. For a dataset: source, version, hash, license, owner and which models or indexes consume it. Field lists are in who owns a prompt in production and what to record for a dataset.

Keep it current

A sweep decays. Add a check to the pull request template: does this change add a prompt, a dataset or a new model call? If yes, the inventory is updated in the same pull request. Re run the search each quarter and compare with the list.

Where Safeguard fits

Safeguard's SBOM and dependency scanning builds an inventory of the libraries your repositories pull in, including those used around model calls. It does not replace the prompt and dataset sweep above, which is a process you run, but the library inventory is a natural companion. A free scan is at https://gold.safeguard.sh/scan.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how each dependency appears in one list with its source, then think about what a matching list for prompts and datasets would hold.

Quick check

How long does a first sweep take?

It depends on repository count. A small team can finish in a day. A large organization should plan for weeks, mostly spent on the interview pass.

Do notebooks count?

Yes. Any notebook that feeds a production job or holds customer data belongs in the inventory.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.