Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
mgd stands for middleman-github-deploy and is a fork of jgd.
mgd will automatically build your Middleman blog and push it to your gh-pages branch (or any other branch of your choice).
It is assumed that your blog is in the home directory of your repo.
Install it first:
gem install mgd
Run it locally:
mgd
Now your site is deployed to gh-pages
branch of your repo. Done.
PS. You can also specify target branch, with is gh-pages
by default. Use
--branch
command line option.
Everything should work fine with ruby > 2.0.
There is a bug with rubygems (https://github.com/rubygems/rubygems/issues/1420), so if you're getting error like this:
$ mgd
/Users/user/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0x3fc9e849c75c trollop-2.1.2> (NoMethodError)
from /Users/user/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /Users/user/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/gems/mgd-0.1.0/bin/mgd:4:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/mgd:23:in `load'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/mgd:23:in `<main>'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/ruby_executable_hooks:15:in `eval'
from /Users/user/.rvm/gems/ruby-2.3.1@gemset/bin/ruby_executable_hooks:15:in `<main>'
check what is your gem version, should be higher than 2.6.3:
$ gem --version
you can update it via:
$ gem update --system # you might need to be an administrator or root
This is how you might configure your blog to be deployed automatically by travis-ci:
branches:
only:
- master
env:
global:
- secure: ...
install:
- bundle
script: mgd -u http://yourname:$PASSWORD@github.com/yourname/blog.git
The environment variable $PASSWORD
is set through
env/global/secure
, as explained
here.
Don't forget to add gem require 'mgd'
to your Gemfile
.
You can use SSH key instead. First, you should encrypt it:
$ travis encrypt-file id_rsa --add
Then, use the URI that starts with git@
:
script:
- mgd -u git@github.com:yourname/blog.git
Read also this article.
FAQs
Unknown package
We found that mgd 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.