← Back to issue list

Improve detection/setting of the PATH environment variable

View original Github issue

Metadata

Project
rockcraft
Number
#729
Type
issue
State
open
Author
tigarmo
Labels
good first issue
Created
2024-10-09 12:58:44+00:00
Updated
2025-08-15 15:12:46+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### What needs to get done The [current code](https://github.com/canonical/rockcraft/blob/main/rockcraft/oci.py#L392) that prevents empty PATH vars only activates on bare-based rocks; as [Cris points out](https://github.com/canonical/rockcraft/pull/725#discussion_r1793270914) we could improve this to cover any case where the PATH is empty to protect ourselves in the case of future changes or new bases. ### Why it needs to get done The empty PATH is a security vulnerability; generalizing the detection and handling of this case improves the robustness of the code.

Evaluation history

No evaluation history available.