[GUI] apps/host tests: assertPrivate rejects the SDDL alias LA for the built-in Administrator

オープン 初心者向け
#5,576 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
javascript, node.js
領域
desktop, testing

調査の方向性

apps/host/tests/helpers/assert-private.mjsから始め、#3302とPR #3406で参照されているTerminalの修正と比較してください。Windowsで組み込みAdministratorとしてnode --test tests/model-providers.test.mjsを実行し、不一致を再現してください。WindowsがtrusteeをLAまたは完全なSIDとして報告する場合に、現在のユーザーに対する1つのACEを持つ保護されたACLをチェックが受け入れれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Source (START-HERE.bat, setup.sh or a build)

What happened

apps/host/tests/helpers/assert-private.mjs:13 compares the raw DACL text to a string built from the current SID:

assert.equal(dacl, `D:PAI(A;;FA;;;${currentUserSid()})`, `ACL is not owner-only: ${sddl}`);

On a host whose account is the built-in Administrator (RID 500), makePrivate() writes the correct protected ACL with icacls /grant:r *<SID>:F /inheritance:r, but Windows renders that trustee as the SDDL alias LA in Get-Acl. The assertion then fails on an ACL that is exactly what the product code just wrote. This is the same class as #3302 and PR #3406, which fixed the Terminal's Python check and its tests by resolving the trustee; the desktop host's Node helper still compares the text.

Expected: the check passes when the file has one protected ACE naming only the current user, however Windows spells that trustee (LA or the full SID).

Suggested fix: resolve each trustee field to a string SID before comparing (as the Terminal fix does with ConvertStringSidToSidW + ConvertSidToStringSidW), or compare with EqualSid. As a minimal host-side change, accept LA when currentUserSid() ends in -500.

Smallest steps or command that reproduce it

On Windows, signed in as the built-in Administrator (SID ends in -500), from apps/host:

node --test tests/model-providers.test.mjs

Actual:

✖ connections persist, redact keys, retain unchanged keys, and validate endpoints/models
  AssertionError [ERR_ASSERTION]: ACL is not owner-only: O:LAG:S-1-5-21-<domain>-513D:PAI(A;;FA;;;LA)
  + actual   'D:PAI(A;;FA;;;LA)'
  - expected 'D:PAI(A;;FA;;;S-1-5-21-<domain>-500)'
  at assertPrivate (tests/helpers/assert-private.mjs:13:10)

Get-Acl on the same file shows a single FullControl entry for the account, and whoami /user shows S-1-5-21-<domain>-500. The ACL is private; only the notation differs.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.12 (tag v0.2.12, commit 123bad4a) · engine 0.1.58

Graphics card, memory and system

RTX 4090 24 GB · 253 GB RAM · Intel Core Ultra 9 285K · Windows 11 25H2 (build 26200.8655) · account is the built-in Administrator (RID 500)

Logs

node --test tests/model-providers.test.mjs output, one failure:

ℹ fail 1
✖ failing tests:
test at tests\model-providers.test.mjs:10:1
✖ connections persist, redact keys, retain unchanged keys, and validate endpoints/models
  AssertionError [ERR_ASSERTION]: ACL is not owner-only: O:LAG:S-1-5-21-3783197670-1434537263-246626064-513D:PAI(A;;FA;;;LA)
主要言語
C++
スター
11.6k
フォーク
1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。