Security check

trailsbi scan looks through a project's files for what shouldn't be shared, and writes a report for a security check.

  • trailsbi scan "D:\Reports\Sales"

    writes an HTML page in the current folder

  • trailsbi scan "D:\Git\Sales workspace" -m Sales

    one semantic model of a workspace (-w and -r work too)

  • trailsbi scan "D:\Reports\Sales" --md --json

    Markdown and JSON instead of the page

  • trailsbi scan "D:\Reports\Sales" -o check.html

    says where, and by the extension in which format

It changes nothing in the project, saves no run, and nothing leaves your machine. --open opens the report.

What it finds

Section What
Secrets Passwords, keys and tokens: in Power Query, DAX, parameters, connection strings, addresses, descriptions, report texts and comments. Also the known shapes of keys (AWS, Azure, GitHub, Google, Slack, Stripe, Databricks, OpenAI, Anthropic), JSON web tokens, private keys and basic authentication. In comments, descriptions and texts, password=x and password: x1
Merge conflicts Files that Git couldn't merge, with both versions in them
Typed rows Rows typed into queries (Enter data, #table, Table.FromRows and so on) and into DATATABLE
Picked values The fields for which values are picked in filters, slicers and bookmarks, and how many

Each finding says which object it's in, and the file and line. A legacy report.json is one line, so there its page and visual aren't named. The report never has a secret in it: only the first two characters are shown, and none of a short one. The same goes for one that scan recognizes in a name, such as a query's or a file's. Values that were typed or picked aren't in it either.

Every text file of the reports and models is searched, and the .pbip files next to them, apart from .git, custom visuals' own code and TrailsBI's own files. In .pbi folders only unappliedChanges.json is, because that one can end up in Git: imported data is never read. A file that should be text and isn't is listed as not read.

Finding nothing is no proof that there is nothing. Scan knows the common ways to write these. A password built from pieces, or a key with a name of your own, isn't found. Neither is what was picked by clicking in a visual and saved in a bookmark. Sometimes it reports something that is no secret.

The JSON

Key What it holds
format, schemaVersion, generator trailsbi-scan, 1.0, and the TrailsBI that made it
project Its name
files How many files were searched
unread Files that couldn't be read
findings Each with its section (secret, conflict, data, picked), kind, object, path, line (or null) and what is shown of it