10-26-2006
Implications of setting sensitive data in ENV
Hello people,
In shell scripts if some sensitive data is set into the env so that it is available to other scripts called within those scripts -- Are there are security implications ?
-- I believe the scope of those environment variables ends with the execution of the script.
-- I see that while the script is running those env variables are not accessible from the command line.
Is my understanding correct? Any comments ? Please let me know.
Regards,
T.
10 More Discussions You Might Find Interesting
1. Solaris
I am trying to set up my compiler, but when I go to look for
gcc it not found but I get a message
that stayed (/usr/oasys/bin) and when I go into the dir
to set my env the following is type
cp : cannot creat //pref/.environ: no such file or directory
and I input ./setenv PATH=... (3 Replies)
Discussion started by: alsande
3 Replies
2. AIX
hi eveybody,
i m trying to set acl using acledit command in AIX box
but wat im gettung is
3002-100 acledit: EDITOR environment variable not set
can anyone help me out how 2 set editor....................
thanks in advance (4 Replies)
Discussion started by: rrlog
4 Replies
3. Red Hat
Hi there,
How can I change bash to csh when starting a terminal, and set some aliases for csh? I can't find such files like .cshrc in my home directory.
Thanks a lot (1 Reply)
Discussion started by: dustinwang2003
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I wrote two small scripts to set env variables in a shell.
java_env.csh
#!/bin/csh -fn
setenv JAVA_HOME '/scratch/software/jdk1.5.0_11'
setenv PATH $PATH':'$JAVA_HOME'/bin'
and run it using csh ./java_env.csh
But the env variables are not set. I tried running each line on the... (5 Replies)
Discussion started by: NoviceAmod
5 Replies
5. Shell Programming and Scripting
I am facing a very strange issue. I have script in ksh with #!/bin/ksh as shebang.
This script has function which sets the env variable before running other functions of the script. by
set_up_env()
{
CONFIG_FILE="/opt/app/tools/deepmarking/latestVersion/script/UploadEnv"
if
then
... (7 Replies)
Discussion started by: Tuxidow
7 Replies
6. Shell Programming and Scripting
I have perl script and in the first line we are invoking .sh script to set ENV variables.
e..g
eval '. $envfile; exec $PERL -S $0 "$@"'
I want to change some of the env variables while the program is running and I am settging it like this ..
$ENV{ORACLE_HOME}=trim($oraclehome);... (1 Reply)
Discussion started by: talashil
1 Replies
7. Post Here to Contact Site Administrators and Moderators
Hello,
Can you please delete or modify a post that contains sensitive data. I can't post full links, here's the end of the link: shell-programming-and-scripting/94965-help-shell-scripting-modify-user-creation-script-oracle-database.html
It's got a lot of data that should never be posted on... (2 Replies)
Discussion started by: JonHeller
2 Replies
8. Post Here to Contact Site Administrators and Moderators
Hi Sir ,
Please remove the following code from the post
https://www.unix.com/unix-for-advanced-and-expert-users/210081-ftp-issue.html
thanks
Prabhu (7 Replies)
Discussion started by: ptappeta
7 Replies
9. Post Here to Contact Site Administrators and Moderators
Hi Sir,
please remove following terms from post as it is sensitive data
https://www.unix.com/shell-programming-and-scripting/235655-print-single-line.html
ifeeds
fidedev
ironsides
feedmgr
thanks a lot
prabhu (1 Reply)
Discussion started by: ptappeta
1 Replies
10. Post Here to Contact Site Administrators and Moderators
Hi
Kindly remove the following from the post . These are confidential info posted by mistake
https://www.unix.com/shell-programming-and-scripting/201037-perl-while-loop-each.html
please remove the comments section which is first 16 lines in the perl script .
Also please remove the ... (1 Reply)
Discussion started by: ptappeta
1 Replies
LEARN ABOUT NETBSD
npm-run-script
NPM-RUN-SCRIPT(1) NPM-RUN-SCRIPT(1)
NAME
npm-run-script - Run arbitrary package scripts
SYNOPSIS
npm run-script <command> [--silent] [-- <args>...]
alias: npm run
DESCRIPTION
This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts.
run[-script] is used by the test, start, restart, and stop commands, but can be called directly, as well. When the scripts in the package
are printed out, they're separated into lifecycle (test, start, restart) and directly-run scripts.
As of ` https://blog.npmjs.org/post/98131109725/npm-2-0-0, you can use custom arguments when executing scripts. The special option -- is
used by getopt https://goo.gl/KxMmtG to delimit the end of the options. npm will pass all the arguments after the -- directly to your
script:
npm run test -- --grep="pattern"
The arguments will only be passed to the script specified after npm run and not to any pre or post script.
The env script is a special built-in command that can be used to list environment variables that will be available to the script at run-
time. If an "env" command is defined in your package, it will take precedence over the built-in.
In addition to the shell's pre-existing PATH, npm run adds node_modules/.bin to the PATH provided to scripts. Any binaries provided by
locally-installed dependencies can be used without the node_modules/.bin prefix. For example, if there is a devDependency on tap in your
package, you should write:
"scripts": {"test": "tap test/*.js"}
instead of
"scripts": {"test": "node_modules/.bin/tap test/*.js"}
to run your tests.
The actual shell your script is run within is platform dependent. By default, on Unix-like systems it is the /bin/sh command, on Windows it
is the cmd.exe. The actual shell referred to by /bin/sh also depends on the system. As of `
https://github.com/npm/npm/releases/tag/v5.1.0 you can customize the shell with the script-shell configuration.
Scripts are run from the root of the module, regardless of what your current working directory is when you call npm run. If you want your
script to use different behavior based on what subdirectory you're in, you can use the INIT_CWD environment variable, which holds the full
path you were in when you ran npm run.
npm run sets the NODE environment variable to the node executable with which npm is executed. Also, if the --scripts-prepend-node-path is
passed, the directory within which node resides is added to the PATH. If --scripts-prepend-node-path=auto is passed (which has been the
default in npm v3), this is only performed when that node executable is not found in the PATH.
If you try to run a script without having a node_modules directory and it fails, you will be given a warning to run npm install, just in
case you've forgotten.
You can use the --silent flag to prevent showing npm ERR! output on error.
You can use the --if-present flag to avoid exiting with a non-zero exit code when the script is undefined. This lets you run potentially
undefined scripts without breaking the execution chain.
SEE ALSO
o npm help 7 scripts
o npm help test
o npm help start
o npm help restart
o npm help stop
o npm help 7 config
January 2019 NPM-RUN-SCRIPT(1)