
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
A bash framework to fill the gaps to write testable, predictable and scoped code in bash highly inspired by jandob's great tool rebash rebash.
Integrate bashlink into your bash script (only main entry file):
if [ -f "$(dirname "${BASH_SOURCE[0]}")/node_modules/bashlink/module.sh" ]; then
# shellcheck disable=SC1090
source "$(dirname "${BASH_SOURCE[0]}")/node_modules/bashlink/module.sh"
elif [ -f "/usr/lib/bashlink/module.sh" ]; then
# shellcheck disable=SC1091
source "/usr/lib/bashlink/module.sh"
else
echo Needed bashlink library not found 1>&2
exit 1
fi
bl.module.import bashlink.logging
# Your code comes here.
Integrate bashlink into your standalone bash script:
moduleName_bashlink_path="$(
mktemp --directory --suffix -module-name-bashlink
)/bashlink/"
mkdir "$moduleName_bashlink_path"
if wget \
https://goo.gl/UKF5JG \
--output-document "${moduleName_bashlink_path}module.sh" \
--quiet
then
bl_module_retrieve_remote_modules=true
# shellcheck disable=SC1091
source "${moduleName_bashlink_path}module.sh"
else
echo Needed bashlink library not found 1>&2
rm --force --recursive "$moduleName_bashlink_path"
exit 1
fi
# Your standalone code comes here
Or combine both to implement a very agnostic script.
if [ -f "$(dirname "${BASH_SOURCE[0]}")/node_modules/bashlink/module.sh" ]; then
# shellcheck disable=SC1090
source "$(dirname "${BASH_SOURCE[0]}")/node_modules/bashlink/module.sh"
elif [ -f "/usr/lib/bashlink/module.sh" ]; then
# shellcheck disable=SC1091
source "/usr/lib/bashlink/module.sh"
else
moduleName_bashlink_path="$(
mktemp --directory --suffix -module-name-bashlink
)/bashlink/"
mkdir "$moduleName_bashlink_path"
if wget \
https://goo.gl/UKF5JG \
--output-document "${moduleName_bashlink_path}module.sh" \
--quiet
then
bl_module_retrieve_remote_modules=true
# shellcheck disable=SC1090
source "${moduleName_bashlink_path}/module.sh"
else
echo Needed bashlink library not found 1>&2
rm --force --recursive "$moduleName_bashlink_path"
exit 1
fi
fi
# Your portable code comes here.
Best practise (entry) module pattern:
if [ -f "$(dirname "${BASH_SOURCE[0]}")/node_modules/bashlink/module.sh" ]; then
# shellcheck disable=SC1090
source "$(dirname "${BASH_SOURCE[0]}")/node_modules/bashlink/module.sh"
elif [ -f "/usr/lib/bashlink/module.sh" ]; then
# shellcheck disable=SC1091
source "/usr/lib/bashlink/module.sh"
else
moduleName_bashlink_path="$(
mktemp --directory --suffix -module-name-bashlink
)/bashlink/"
mkdir "$moduleName_bashlink_path"
if wget \
https://goo.gl/UKF5JG \
--output-document "${moduleName_bashlink_path}module.sh" \
--quiet
then
bl_module_retrieve_remote_modules=true
# shellcheck disable=SC1090
source "${moduleName_bashlink_path}/module.sh"
else
echo Needed bashlink library not found 1>&2
rm --force --recursive "$moduleName_bashlink_path"
exit 1
fi
fi
bl.module.import bashlink.exception
bl.module.import bashlink.logging
bl.module.import bashlink.tools
# Your module functions comes here.
if bl.tools.is_main; then
bl.exception.activate
bl.exception.try
moduleName.main "$@"
bl.exception.catch_single
{
[ -d "$moduleName_bashlink_path" ] && \
rm --recursive "$moduleName_bashlink_path"
# shellcheck disable=SC2154
[ -d "$bl_module_remote_module_cache_path" ] && \
rm --recursive "$bl_module_remote_module_cache_path"
bl.logging.error "$bl_exception_last_traceback"
}
[ -d "$moduleName_bashlink_path" ] && \
rm --recursive "$moduleName_bashlink_path"
# shellcheck disable=SC2154
[ -d "$bl_module_remote_module_cache_path" ] && \
rm --recursive "$bl_module_remote_module_cache_path"
fi
FAQs
Testable, predictable and scoped code in bash.
The npm package bashlink receives a total of 143 weekly downloads. As such, bashlink popularity was classified as not popular.
We found that bashlink demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.