• Stars
    star
    3
  • Rank 3,863,942 (Top 79 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 12 years ago
  • Updated about 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of useful tools for auditing data and performing security checks.

SecurityGuard Build Status Dependency Status

This gem is a collection of useful tools for auditing data and performing security checks.

Installation

Standalone

$ gem install security_guard

As part of your application

Add this line to your application's Gemfile:

gem 'security_guard'

And then execute:

$ bundle

Usage

Executable

There is an sguard command if you intend to use security_guard as a command line tool. Please refer to the help option for its usage.

sguard -h

Tips

You can pass in setters during initialisation, for example:

country_ips = SecurityGuard::CountryIps.new
country_ips.countries = ['Australia', 'United Kingdom']
country_ips.ips = ['4.4.4.4', '8.8.8.8', '203.206.0.1']

# the above is equivalent to:

country_ips = SecurityGuard::CountryIps.new(
  :countries => ['Australia', 'United Kingdom'],
  :ips       => ['4.4.4.4', '8.8.8.8', '203.206.0.1']
)

Country IPs

Returns a list of the IPs from given country and IP dictionaries. Useful for auditing IPs from higher risk nations.

SecurityGuard::CountryIps.new(
  :countries => ['Australia'],
  :ips       => ['4.4.4.4', '8.8.8.8', '203.206.0.1']
).result # => ['203.206.0.1']

You may also pass country and IP data as a line-delimited file by appending _from_file at the end of the attributes:

country_ips.countries_from_file = '/path/to/the/file'
country_ips.ips_from_file = '/path/to/the/file'

Deduplication

Deduplicates line-delimited content contained within a list of files. Useful for deduplicating email newsletter subscription lists.

SecurityGuard::Deduplication.new(
  :input_folder  => '/path/to/the/input/folder',
  :output_folder => '/path/to/the/output/folder'
).process

Sequences

Prepends line-delimited content with a comma-delimited sequence column (1, 2, 3...) for counting.

SecurityGuard::Sequences.new(
  :input_folder  => '/path/to/the/input/folder',
  :output_folder => '/path/to/the/output/folder'
).process

Changelog

v0.0.6 [2012-03-07]

  • Output file names are now automatically mapped from the input file names

v0.0.5 [2012-03-07]

  • Fixed the file ordering issue on some OSes like Linux
  • Fixed the non-existing specs/tmp directory that causes specs to fail

v0.0.4 [2012-02-08]

  • Fixed Concerns::Initializable for CountryIps
  • Added Deduplication

v0.0.3 [2012-01-20]

  • Added Concerns::Initializable

v0.0.2 [2012-01-19]

  • Added IP address sanity check
  • Coloured test output
  • Added changelog

v0.0.1 [2012-01-18]

  • First release, implemented CountryIps and bin/sguard

Contributing

  1. Fork it
  2. Make sure you add documentation to README.md
  3. Make sure you test all your code
  4. Do your magic!
  5. Create a new Pull Request

Author

Brought to you by SitePoint.

More Repositories

1

crawler

A high performance web crawler / scraper in Elixir.
Elixir
917
star
2

jquery-endless-scroll

Endless/infinite scrolling/pagination.
CoffeeScript
838
star
3

angel_nest

Project code name: Angel Nest. :)
Ruby
775
star
4

api_taster

A quick and easy way to visually test your Rails application's API.
Ruby
728
star
5

simple_bayes

A Naive Bayes machine learning implementation in Elixir.
Elixir
392
star
6

datamappify

Compose, decouple and manage domain logic and data persistence separately. Works particularly great for composing form objects!
Ruby
332
star
7

opq

Elixir queue! A simple, in-memory queue with worker pooling and rate limiting in Elixir.
Elixir
255
star
8

stemmer

An English (Porter2) stemming implementation in Elixir.
Elixir
149
star
9

bustle

Activities recording and retrieving using a simple Pub/Sub-like interface.
Ruby
93
star
10

ruby_decorators

Ruby method decorators inspired by Python.
Ruby
63
star
11

inherited_resources_views

Share and DRY up views between resources. Use with Inherited Resources.
Ruby
60
star
12

jquery-inline-confirmation

Inline Confirmation plugin for jQuery. One of the less obtrusive ways of implementing confirmation dialogues.
JavaScript
53
star
13

toy-robot-elixir

The infamous Toy Robot code test done in Elixir.
Elixir
45
star
14

skinny-coffee-machine

A simple JavaScript state machine with observers, for browsers and Node.js.
JavaScript
42
star
15

kohana-phamlp

This module is a bridge between the Kohana PHP framework (http://kohanaframework.org/) and the PHamlP library (http://code.google.com/p/phamlp/).
PHP
25
star
16

authlite

Authlite, an auth module for Kohana PHP framework, it offers greater flexibility than the official Auth module.
PHP
23
star
17

dotfiles

My dotfiles
Shell
18
star
18

amaze_hands

Amaze Hands is an amazing tool developed for analysing Kanban board cards.
Ruby
15
star
19

kthrottler

A Kohana port of Action Throtller (for Rails): http://github.com/fredwu/action_throttler
PHP
14
star
20

jquery-slideshow-lite

An extremely lightweight slideshow plugin for jQuery.
JavaScript
14
star
21

code-test-2016-cultureamp

Ruby
13
star
22

README-xplor

Fred @ Xplor - how to work with me.
10
star
23

code-test-2016-myob

Ruby
8
star
24

code-test-2016-trunkplatform

Ruby
6
star
25

action_throttler

An easy to use Rails plugin to quickly throttle application actions based on configurable duration and limit.
Ruby
6
star
26

app_reset

Resets (and if available, seeds) your databases.
Ruby
6
star
27

yield.rb

Aggregated token amounts and values. Supports ApeBoard, YieldWatch, Binance, CoinGecko and more.
Ruby
5
star
28

layerful

Layerful PHP framework.
4
star
29

advent_of_code_2018

https://adventofcode.com/2018/about
Elixir
4
star
30

ruby-slim-tmbundle

https://github.com/slim-template/ruby-slim.tmbundle
3
star
31

fredwu.me-v3

JavaScript
3
star
32

flower

Playground to test out the Lotus framework.
Ruby
2
star
33

kata-poker-hands-elixir

A coding kata for comparing poker hands - Elixir version.
Elixir
2
star
34

jqstub

A simple stub library for jQuery / Zepto objects.
JavaScript
1
star
35

project_retard

One sale a day e-commerce platform built on Ruby on Rails.
JavaScript
1
star
36

toy-robot-lolz

It's art. And it's beautiful.
Ruby
1
star
37

reacraft

Ruby
1
star
38

kata-poker-hands-ruby

A coding kata for comparing poker hands - Ruby version.
Ruby
1
star
39

spiky_xml

Just a spike on XML parsing in different environments.
JavaScript
1
star
40

code-test-2016-adslot

CoffeeScript
1
star