# Sanitize output files

**URL:** <https://discourse.openondemand.org/t/sanitize-output-files/1656>\
**Category:** Get Help\
**Created:** [August 30, 2021, 5:36pm UTC](https://discourse.openondemand.org/t/sanitize-output-files/1656 "2021-08-30T17:36:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maflister](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maflister/32/139_2.png) [@maflister](https://discourse.openondemand.org/u/maflister)\
**Post date:** [August 30, 2021, 5:36pm UTC](https://discourse.openondemand.org/t/sanitize-output-files/1656/1 "2021-08-30T17:36:00Z")

</div>

Is there any way to remove sensitive info from the output files, or disable writing certain output files altogether?

For example, suppose we want to run an encrypted singularity container as a wrapper for bc\_desktop. We can pull the password using an environment variable, but then the value is saved in job\_script\_content.sh.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [August 30, 2021, 7:28pm UTC](https://discourse.openondemand.org/t/sanitize-output-files/1656/2 "2021-08-30T19:28:17Z")

</div>

I’m not sure there are secrets in OnDemand. That is, the unprivileged user has to be able to read that from _somewhere_. You may be able to set environment variables when you submit the job, or perhaps read from some /etc/ location - but that’s only obfuscating the variable. An unprivileged user has to be able to get this information - meaning it’s not really a secret.

That said - maybe a Slurm prologue (or your scheduler sversion of the same feature) is where you want to set this.

---

<div class="post-metadata">

**Author:** ![maflister](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/maflister/32/139_2.png) [@maflister](https://discourse.openondemand.org/u/maflister)\
**Post date:** [August 31, 2021, 2:19pm UTC](https://discourse.openondemand.org/t/sanitize-output-files/1656/3 "2021-08-31T14:19:40Z")

</div>

Thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:42pm UTC](https://discourse.openondemand.org/t/sanitize-output-files/1656/4 "2022-05-26T15:42:48Z")

</div>

Closed on May 26, 2022, 3:42pm UTC


