opensafely-core / opensafely-core/sysadmin

only allow certain file types to be written to Level 4

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

Nobody has claimed this yet.

Dominant language
Python
Stars
0
Forks
0
Avg merge
2d 7h
Merged PRs (30d)
3

Description

As a minimum: txt csv tsv log json svg png jpeg ipynb md html pdf.

My main thinking for this is that R objects often contain the the arguments that were passed to them, such as data frames (and sometimes entire environments). This is Bad because a user might be tempted to release that object out of L4 for local processing, without realising the security implications. For example a ggplot object contains the data used to plot the object, even if the plot is for lower dimension derivations of the data like a density plot or a chart showing pairwise correlations. There are lots of other examples.

Github's 100mb file limit won't catch everything, especially with compression. Asumming a whitelist is probably safer than a blacklist.

Arguably html md and pdf could contain disclosive info that isn't visible when rendered but i think that's a separate issue.

May need a system request additional file types.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

The issue names no files, tests, or entry points. Start by locating the Level 4 write path; done would require an agreed file-type whitelist and a defined way to request additional types.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.