intersystems / intersystems/ipm

IPM should prevent copying files when using FileCopy/equivalent to RO directories

Open
#1,232 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
ObjectScript
Stars
41
Forks
29
Avg merge
23h 54m
Merged PRs (30d)
4

Description

## Describe the bug
IPM allows usage of $ variables arbitrarily. When these are used in the target directory of a FileCopy or other resource processors, we should warn for now (make it break in v1) if the target directory lives under $System.Util.InstallDirectory(). Targets for copy should always be under $System.Util.DataDirectory() instead. This affects at a minimum {$cspDir} and {$installDir} but others should be reviewed as well.

## To Reproduce
Steps to reproduce the behavior:
1. Create a module.xml with FileCopy where InstallDirectory container {$cspDir} or {$installDir}
2. Try installing the module in a container where /usr/irissys is RO
3. See FileCopy error during Activate phase

## Expected behavior
A clear and concise description of what you expected to happen.

## System information (please complete the following information):
- IPM version: 0.10.8

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the FileCopy case from the module.xml steps in a container where /usr/irissys is read-only. Inspect FileCopy and other resource processors that resolve {$cspDir}, {$installDir}, or similar targets; done means unsafe targets under $System.Util.InstallDirectory() are clearly warned about now and blocked in the planned v1 behavior, while valid data-directory targets continue to work.

Written by the indexing model from the issue text.

Assessment

Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.