Skip to main content

Tracked refs

By default, Dwaar scans your default branch. That's fine until you remember that production runs the release/2.0 branch, and all your findings describe code you aren't shipping.

A tracked ref tells Dwaar what to scan on a resource. Repositories track branches and tags. Images track image tags. No other resource kind tracks refs.

Where refs come from​

OriginHow it got thereTo stop scanning it
DefaultDiscovery added it: the default branch and the newest tagExclude it. You can turn it back on later
RuleThe connection's scanning rules matched itExclude it. You can turn it back on later
ManualA person added itStop tracking it. The ref is removed

Prerequisites​

  • resources:update on the organization that owns the resource.
  • A repository or an image. The Discovery config card appears on both the Overview and Scans tabs.

Track another ref​

  1. Open the repository or image.
  2. On the Discovery config card, select Track a branch or tag, or Track an image tag on an image.
  3. On a repository, choose Branch or Tag.
  4. Enter the name, such as release/2.0, v2.1.0 or 2.15.0.
  5. Select Track.

You should see the ref in the table. Dwaar resolves it on the next discovery and scans what it points to, so Snapshot and Resolved stay empty until then.

Read the table​

ColumnWhat it means
RefThe name. An excluded ref shows an Excluded badge
KindBranch, tag or image tag
OriginDefault, rule or manual
SnapshotThe commit or digest it last resolved to
PlatformsEach platform of a multi-architecture image, with its digest
ResolvedWhen Dwaar last resolved it

Limits​

  • At most 5 refs beyond the defaults can be on at once. To add another, stop tracking or exclude one first. The defaults don't count towards this.
  • A connection's branch rules match at most 3 branches besides the default branch. You set those rules on the connection's Scanning tab.
  • Branch and tag names can be up to 255 letters, digits and . _ / + -. They can't contain .., start with - or /, or end with / or .lock.
  • Image tags can be up to 128 letters, digits and _ . -, and can't start with . or -.
Important

Each version has its own findings. When you exclude a ref, Dwaar stops scanning it, so its findings stop being updated. Look at them before you decide they no longer matter.

Pick refs on purpose​

Five is a deliberate limit. Track what you run and what you support, not every branch somebody pushed. A good starting set is the default branch, your current release branch, and the previous release you still patch.

Try this next​

Add your current release branch, and once it has been scanned, use the scan picker beside Rescan on the resource's Findings tab to compare its findings with the default branch. The gap between them is exactly the risk you'd miss by only watching main.