microsoft / microsoft/sbom-tool

ScanManifest_(timestamp).json file collision

Open
#495 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted tabled
Dominant language
C#
Stars
2.1k
Forks
201
Avg merge
6d 21h
Merged PRs (30d)
1

Description

The Microsoft.ManifestTool tool generates a temporary file in a shared directory, with apparently nothing but a timestamp to make it unique. But when msbuild builds a multi-targeting project, both projects may invoke the tool concurrently, and the timestamp can actually collide:

image

This breaks the build.
Please add more entropy to the filename, or allow a command line switch to specify a directory that is safely isolated from concurrent builds, and I'll happily provide that location.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating where Microsoft.ManifestTool creates the temporary ScanManifest_(timestamp).json file, then reproduce the collision during a concurrent multi-target build. Done means concurrent invocations no longer overwrite or conflict on the temporary filename, or can use an isolated directory as described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.