Language: TypeScript
Label: safe
CWE: CWE-200 \u2014 Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

Code:
  async function runNgsscbuild() {
    architect = (await createArchitect(host.root())).architect;

    // A "run" can have multiple outputs, and contains progress information.
    const run = await architect.scheduleTarget(targetSpec);

    // The "result" member (of type BuilderOutput) is the next output.
    const output = await run.result;

    // Stop the builder from running. This stops Architect from keeping
    // the builder-associated states in memory, since builders keep waiting
    // to be scheduled.
    await run.stop();
    return output;
  }