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.
= Statixite
Statixite is a management tool for static websites originally designed to work with {Jekyll}[https://jekyllrb.com], but with the hopes to support other static site generators. This project rocks and uses MIT-LICENSE and we always welcome contributors. {Statixite}[https://statixite.com] is also available as a service. The project is made so that developers can create there own management tool and setup custom deployment options, such as {Github Pages}[https://pages.github.com/], {Amazon S3}[https://aws.amazon.com/s3], or {Rackspace Cloud Files}[https://www.rackspace.com/en-us/cloud/files]
=== Demo[https://app.statixite.com/users/sign_in?demo=true]
=== Requirements
=== Getting started
Statixite is a Rails::Engine packaged into a gem, so it can be added to any Rails project. To start with a fresh project, use the following command:
Create a new rails app
bash$ rails new myapp --database=postgresql
Add Statixite to your gemfile
gem 'statixite'
Run bundle and the Statixite generator to write the config file.
bash$ bundle install bash$ rails generate statixite
This will generate the following file:
Statixite.setup do |config| # Used for Media Uploader # Valid options - # :file which commit media files directly to the associated site repo # :fog use Fog::Storage => A carrierwave.rb initializer file is required: see https://github.com/carrierwaveuploader/carrierwave config.carrierwave_storage = :file
# Where to deploy
# Valid options -
# :local stores sites at /path/to/app/sites/:site_name/build
# :github pushes sites to your github account requires github creds and ssh access to account
# :fog pushes sites using fog storage requires fog creds tested against S3 and Rackspace Cloud Files
config.deploy_sites_to = :local
# Deploying sites to github requires a personal access token to create repos
# github creds => get personal token from github https://github.com/blog/1509-personal-api-tokens
# config.github_user = username
# config.github_token = ENV["GITHUB_TOKEN"]
# fog creds AWS S3 example
# config.fog_credentials = {
# :provider => 'AWS',
# :aws_access_key_id => ENV["AWS_ACCESS_KEY_ID"],
# :aws_secret_access_key => ENV["AWS_SECRET_ACCESS_KEY"]
# }
# fog creds Rackspace Cloud Files example
# config.fog_credentials = {
# :provider => 'Rackspace',
# :rackspace_username => ENV['RACKSPACE_USERNAME'],
# :rackspace_api_key => ENV['RACKSPACE_API_KEY'],
# :rackspace_region => :dfw
# }
end
=== Mount the Engine
Make sure to mount the Statixite Engine in your routes file
Rails.application.routes.draw do
mount Statixite::Engine => "/statixite"
# ...
end
=== Migrate the tables
bash$ rake db:migrate
You can now start your dev server and begin creating sites at [http://localhost:3000/statixite/sites]
=== Site Structure
root |__ sites |__ :site_name # As defined when a site is created |__ clone # Main directory where changes are made |__ repo # Where changes are pushed which can be configured to be a remote repository |__ build # Similar to the site folder built when a deployment is made |_ public |__ statixite # Statixite Namespace |__ previews |__ :site_name
=== Deployment Options
==== Local
Sites are built locally. In production you could use a similar NGINX config to serve the sites:
server { listen 80; server_name ~^(?.+).example.com$; root /path/to/app/sites/$subdomain/build; index index.html; error_page 404 /404.html; location /404.html { root /path/to/app/sites/$subdomain/build; } }
==== Github
This option requires a personal access token to be created through your github account. Sites will be deployed to a repo prefixed with "statixite-" and deployed to the "gh-pages" branch.
config.deploy_sites_to = :github config.github_token = 'some token'
==== Fog
Fog is a cloud service Ruby gem that can allow you to deploy sites to cloud containers. Fog[fog.io]
config.deploy_sites_to = :fog
config.fog_crednentials = { :provider => 'AWS', :aws_access_key_id => ENV["AWS_ACCESS_KEY_ID"], :aws_secret_access_key => ENV["AWS_SECRET_ACCESS_KEY"], }
=== Contributing
This repo needs some love! We always encourage contributors. Please follow a few simple guidelines:
FAQs
Unknown package
We found that statixite 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.