توضیح (فارسی)
go-witness و witness ماژول های Go برای تولید attestation ها هستند. قبل از version 0.12.0، RecordArtifacts یک symbolic link را با filepath.EvalSymlinks resolve میکند و سپس بدون بررسی اینکه هدف در base path مورد attest باقی بماند، در مسیر resolve شده recursion میکند. یک symlink در درخت دایرکتوری attested که به خارج از آن اشاره میکند، باعث میشود فایل attestor هدف out-of-tree را باز، hash و ثبت کند. اجرای witness run روی یک دایرکتوری تحت تأثیر مهاجم (یک repository checkout شده، یک pull-request build، یک archive unpack شده) بنابراین فایل های خارج از workspace مقصود (secrets، system files) را میخواند و digest ها و مسیرهای آنها را در attestation ثبت میکند. این مسئله در version 0.12.0 patch شده است.
Original description (English)
go-witness and witness are Go modules for generating attestations. Prior to version 0.12.0, RecordArtifacts resolves a symbolic link with filepath.EvalSymlinks and then recurses into the resolved path with no check that the target stays within the base path being attested. A symlink in the attested directory tree that points outside it causes the file attestor to open, hash, and record the out-of-tree target. Running witness run over an attacker-influenced directory (a checked-out repository, a pull-request build, an unpacked archive) therefore reads files outside the intended workspace (secrets, system files) and records their digests and paths into the attestation. This issue has been patched in version 0.12.0.