Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Memcached plugin for Kuby.
The memcached plugin provides the ability to stand up arbitrary memcached instances. Behind the scenes it uses the excellent kubedb Kubernetes operator.
Add the kuby-memcached gem to your Gemfile, then add a memcached instance like this:
require 'kuby/memcached'
Kuby.define(:production) do
kubernetes do
add_plugin(:memcached) do
instance(:my_rails_cache)
end
end
end
The kuby-memcached plugin allows a number of additional configuration options too:
Kuby.define(:production) do
kubernetes do
add_plugin(:memcached) do
instance(:my_rails_cache) do
# set the version of memcached you want to use
version '1.5.4-v1' # this is the default version
# set the port memcached listen on and that you'll
# use to connect to the instance
port 11211 # this is the default port
end
end
end
end
Get a list of the memcached versions your cluster supports by running:
bundle exec kuby -e production kubectl -- get memcachedversions
Memcached instances defined in your Kuby config respond to #hostname
, #port
, and #url
methods to help point at them in your Rails configuration. The #url
method returns a complete URL to the memcached instance, including the host and port.
In your Rails config (eg. config/environments/production.rb), point your cache store at your memcached instance like so:
Kuby.load!
url = Kuby.environment.kubernetes
.plugin(:memcached)
.instance(:my_rails_cache)
.url
config.cache_store = :mem_cache_store, url
You can also use a memcached client like the Dalli gem directly:
require 'dalli'
url = Kuby.environment.kubernetes
.plugin(:memcached)
.instance(:my_rails_cache)
.url
dc = Dalli::Client.new(url)
dc.set('abc', 123)
value = dc.get('abc')
Licensed under the MIT license. See LICENSE for details.
FAQs
Unknown package
We found that kuby-memcached demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.