stage 2 cannot review the first bash call of a session

Open
#259 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
cli, security

Research direction

Start by reading inspectShellSession and the shellSessions handling in the host code; the issue says the fix requires a fork change and fork sync. Reproduce the first-call path where inspection returns undefined, then check that stage 2 can review the command using the session shell or its starting environment. Done means the first bash call can be reviewed without being blocked solely because no shell exists yet.

Written by the indexing model from the issue text.

Description

The first bash call of a session skips stage 2: inspectShellSession returns undefined while shellSessions is empty, so there is no shell to read PATH or aliases from.

call 1  tar -xf a.tar -C out   ─▶ stage 1 UNSURE ─▶ stage 2 skipped ("no shell yet") ─▶ blocked
call 2  ls out                 ─▶ SAFE, shell now exists
call 3  tar -xf a.tar -C out   ─▶ stage 1 UNSURE ─▶ reviewer allows ─▶ runs

Seen in the live run for https://github.com/STRML/omp-classifier/issues/258: the same tar was blocked as call 1 ("skipped":"the session's shell cannot be inspected (no shell yet, or it is busy)") and ran as a later call.

Fix is on the host: inspectShellSession would create the session shell for the key when none exists, or report the env it would start with. It needs a fork change and a fork-sync.

Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
49m
Merged PRs (30d)
82

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from STRML/omp-classifier

All issues in STRML/omp-classifier

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.