Skip to content

Set mode 0700 on the code Grader packet and Trial proxy directories - #1860

Merged
JacobStephens2 merged 1 commit into
mainfrom
issue-1859
Nov 9, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
issue-1859

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Trial proxy start
  create thirdshift-proxy- directory mode 0700
  bind proxy.sock inside it

code Grader execute
  create grader- packet directory mode 0700
  copy the repository snapshot and reports into it
  run the checks

Scoring packet staging already creates its directory with permissions(0o700). The code Grader packet and the Trial proxy directory now do the same.

Seams:

  • proxy::start: the directory that holds Guard::socket_path() is mode 0700.
  • code_grader::execute: while a check runs, the directory that holds THIRDSHIFT_TRIAL_STANDARDS_REPORT is mode 0700.

Evidence

Execution evidence

  • Before: cargo test --bin thirdshift proxy::tests::the_trial_proxy_directory_is_private_to_its_owner -- --exact

    assertion `left == right` failed
      left: 509
     right: 448
    

    509 is mode 0775. 448 is 0700.
    After: cargo test --bin thirdshift directory_is_private_to_its_owner

    test proxy::tests::the_trial_proxy_directory_is_private_to_its_owner ... ok
    test sandbox::code_grader::tests::the_code_grader_packet_directory_is_private_to_its_owner ... ok
    
  • Before: cargo test --bin thirdshift sandbox::code_grader::tests::the_code_grader_packet_directory_is_private_to_its_owner -- --exact

    assertion `left == right` failed
      left: "775"
     right: "700"
    

    After: the same command, in the run above, passed.

cargo fmt --check and cargo clippy --all-targets -- -D warnings passed. cargo nextest run --test-threads 3 --retries 2 --no-fail-fast ran 3927 tests: 3927 passed, one of them on a retry after an unrelated systemd scope collision (keeps_review_reports_beside_each_harness_session_log).

Visual evidence

No rendered UI, HTML, CSS, or layout change.

Merge Danger

Door: two-way

Reverting the commit restores the previous creation mode for directories created after the revert.

Blast Radius: local

New code Grader packet directories and Trial proxy directories are owner-only. The same account still reads and writes them. Directories already on disk are left as they are.

Unaddressed findings

Standards

None.

Spec

None.

Security

None.

Security review outcome

No unaddressed introduced findings.

Review coverage

Changed files: src/proxy.rs, src/sandbox/code_grader.rs. Both reviewers read both. No changed file was left unread.

Closes #1859

Built with grok grok 1.0.70 (f50904eaee6c) [stable] · default model · default effort

Match Scoring packet staging, which already creates its packet directory with that mode.
@JacobStephens2
JacobStephens2 merged commit b498b3b into main Nov 9, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1859 branch November 9, 2026 11:28
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set mode 0700 on the code Grader packet and Trial proxy directories

1 participant