{"id":23869431,"url":"https://github.com/fredwu/security_guard","last_synced_at":"2025-09-08T19:31:12.390Z","repository":{"id":2656298,"uuid":"3647020","full_name":"fredwu/security_guard","owner":"fredwu","description":"A collection of useful tools for auditing data and performing security checks.","archived":false,"fork":false,"pushed_at":"2012-05-03T05:27:23.000Z","size":796,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T09:59:12.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://fredwu.me/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fredwu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security_guard.gemspec","support":null}},"created_at":"2012-03-07T07:55:19.000Z","updated_at":"2025-07-16T23:24:52.000Z","dependencies_parsed_at":"2022-09-01T09:02:57.990Z","dependency_job_id":null,"html_url":"https://github.com/fredwu/security_guard","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/fredwu/security_guard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fsecurity_guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fsecurity_guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fsecurity_guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fsecurity_guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fredwu","download_url":"https://codeload.github.com/fredwu/security_guard/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fredwu%2Fsecurity_guard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231438,"owners_count":25245585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-03T12:34:48.264Z","updated_at":"2025-09-08T19:31:11.985Z","avatar_url":"https://github.com/fredwu.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecurityGuard [![Build Status](https://secure.travis-ci.org/fredwu/security_guard.png?branch=master)](http://travis-ci.org/fredwu/security_guard) [![Dependency Status](https://gemnasium.com/fredwu/security_guard.png)](https://gemnasium.com/fredwu/security_guard)\n\nThis gem is a collection of useful tools for auditing data and performing security checks.\n\n## Installation\n\n### Standalone\n\n    $ gem install security_guard\n\n### As part of your application\n\nAdd this line to your application's Gemfile:\n\n    gem 'security_guard'\n\nAnd then execute:\n\n    $ bundle\n\n## Usage\n\n### Executable\n\nThere 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.\n\n    sguard -h\n\n### Tips\n\nYou can pass in setters during initialisation, for example:\n\n```ruby\ncountry_ips = SecurityGuard::CountryIps.new\ncountry_ips.countries = ['Australia', 'United Kingdom']\ncountry_ips.ips = ['4.4.4.4', '8.8.8.8', '203.206.0.1']\n\n# the above is equivalent to:\n\ncountry_ips = SecurityGuard::CountryIps.new(\n  :countries =\u003e ['Australia', 'United Kingdom'],\n  :ips       =\u003e ['4.4.4.4', '8.8.8.8', '203.206.0.1']\n)\n```\n\n### Country IPs\n\nReturns a list of the IPs from given country and IP dictionaries. Useful for auditing IPs from higher risk nations.\n\n```ruby\nSecurityGuard::CountryIps.new(\n  :countries =\u003e ['Australia'],\n  :ips       =\u003e ['4.4.4.4', '8.8.8.8', '203.206.0.1']\n).result # =\u003e ['203.206.0.1']\n```\n\nYou may also pass country and IP data as a line-delimited file by appending `_from_file` at the end of the attributes:\n\n```ruby\ncountry_ips.countries_from_file = '/path/to/the/file'\ncountry_ips.ips_from_file = '/path/to/the/file'\n```\n\n### Deduplication\n\nDeduplicates line-delimited content contained within a list of files. Useful for deduplicating email newsletter subscription lists.\n\n```ruby\nSecurityGuard::Deduplication.new(\n  :input_folder  =\u003e '/path/to/the/input/folder',\n  :output_folder =\u003e '/path/to/the/output/folder'\n).process\n```\n\n### Sequences\n\nPrepends line-delimited content with a comma-delimited sequence column (1, 2, 3...) for counting.\n\n```ruby\nSecurityGuard::Sequences.new(\n  :input_folder  =\u003e '/path/to/the/input/folder',\n  :output_folder =\u003e '/path/to/the/output/folder'\n).process\n```\n\n## Changelog\n\n### v0.0.6 [2012-03-07]\n\n- Output file names are now automatically mapped from the input file names\n\n### v0.0.5 [2012-03-07]\n\n- Fixed the file ordering issue on some OSes like Linux\n- Fixed the non-existing `specs/tmp` directory that causes specs to fail\n\n### v0.0.4 [2012-02-08]\n\n- Fixed `Concerns::Initializable` for `CountryIps`\n- Added `Deduplication`\n\n### v0.0.3 [2012-01-20]\n\n- Added `Concerns::Initializable`\n\n### v0.0.2 [2012-01-19]\n\n- Added IP address sanity check\n- Coloured test output\n- Added changelog\n\n### v0.0.1 [2012-01-18]\n\n- First release, implemented `CountryIps` and `bin/sguard`\n\n## Contributing\n\n1. Fork it\n2. Make sure you add documentation to README.md\n3. Make sure you test all your code\n4. Do your magic!\n5. Create a new Pull Request\n\n## Author\n\n- [Fred Wu](http://fredwu.me/)\n\nBrought to you by [SitePoint](http://www.sitepoint.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwu%2Fsecurity_guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffredwu%2Fsecurity_guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffredwu%2Fsecurity_guard/lists"}