{"id":25939584,"url":"https://github.com/sans-sroc/integrity","last_synced_at":"2025-03-04T04:18:07.910Z","repository":{"id":43175274,"uuid":"325599295","full_name":"sans-sroc/integrity","owner":"sans-sroc","description":"Validation tool for SANS Courseware files. Generates and validates against a checksum file.","archived":false,"fork":false,"pushed_at":"2025-02-12T20:29:19.000Z","size":4116,"stargazers_count":18,"open_issues_count":4,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-12T21:31:14.828Z","etag":null,"topics":["checksums","cli","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/sans-sroc.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-30T16:37:52.000Z","updated_at":"2025-02-11T14:31:04.000Z","dependencies_parsed_at":"2024-06-19T17:11:50.142Z","dependency_job_id":"7ce24593-d3bd-4d9c-a048-6464c7617452","html_url":"https://github.com/sans-sroc/integrity","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sans-sroc%2Fintegrity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sans-sroc%2Fintegrity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sans-sroc%2Fintegrity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sans-sroc%2Fintegrity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sans-sroc","download_url":"https://codeload.github.com/sans-sroc/integrity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780446,"owners_count":20019061,"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","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":["checksums","cli","go","golang"],"created_at":"2025-03-04T04:18:07.362Z","updated_at":"2025-03-04T04:18:07.893Z","avatar_url":"https://github.com/sans-sroc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Integrity\n\n## Overview\n\nFile validation at it's finest.\n\n## Help\n\n```help\nNAME:\n   integrity - integrity\n\nUSAGE:\n   integrity [global options] command [command options] [arguments...]\n\nAUTHORS:\n   Ryan Nicholson \u003crnicholson@sans.org\u003e\n   Don Williams \u003cdwilliams@sans.org\u003e\n   Erik Kristensen \u003cekristensen@sans.org\u003e\n\nCOMMANDS:\n   create    create integrity files\n   validate  validate integrity files\n   version   print version\n\nGLOBAL OPTIONS:\n   --help, -h  show help (default: false)\n```\n\n### Create\n\n```help\nNAME:\n   integrity create - create integrity files\n\nUSAGE:\n   integrity create [command options] [arguments...]\n\nOPTIONS:\n   --name value, -n value       The name that will be given to the ISO volume during USB creation. [$NAME]\n   --user value, -u value       allow setting what user created the file (default: \"ekristen\") [$USER]\n   --log-level value, -l value  Log Level (default: \"info\") [$LOG_LEVEL]\n   --directory value, -d value  The directory that will be the current working directory for the tool when it runs (default: \".\") [$DIRECTORY]\n   --help, -h                   show help (default: false)\n\n```\n\n### Validate\n\n```help\nNAME:\n   integrity validate - validate integrity files\n\nUSAGE:\n   integrity validate [command options] [arguments...]\n\nOPTIONS:\n   --output-format value, --format value  Chose which format to output the validation results (default is none) (valid options: none, json) (default: \"none\") [$OUTPUT_FORMAT]\n   --output value, -o value               When output-format is specified, this controls where it goes, (defaults to stdout) (default: \"-\") [$OUTPUT]\n   --log-level value, -l value            Log Level (default: \"info\") [$LOG_LEVEL]\n   --directory value, -d value            The directory that will be the current working directory for the tool when it runs (default: \".\") [$DIRECTORY]\n   --help, -h                             show help (default: false)\n```\n\n#### Validate Output\n\nThe validate output options change the behavior of the too slightly.\n\nIf the `--output-format` is set to `json` and the `--log-level` has not been set to `none` it will write all logs to `STDERR` while the JSON format is written to `STDOUT`, this is to allow the capture of the `json` separately from the log output.\n\n## Examples\n\n### Simple Create\n\n```bash\nintegrity create -n 572.00.0\n```\n\n### Create w/ Specified Directory\n\n```bash\nintegrity create -n 572.00.0 -d /tmp\n```\n\n### Simple Validate\n\n**Note:** this assumes the create was run in the current working directory and `sans-integrity.yml` already exists.\n\n```bash\nintegrity validate\n```\n\n### Validate w/ Specified Directory\n\n```bash\nintegrity validate -d /tmp\n```\n\n### Validate w/ JSON Output\n\n**Note:** this is really only useful for programmatic validation purposes.\n\n```bash\nintegrity validate --output-format json \n```\n\n### Validate w/ JSON Output to File\n\n**Note:** this is really only useful for programmatic validation purposes.\n\n```bash\nintegrity validate --output-format json --output results.json\n```\n\n## Building\n\nRequires [goreleaser](https://goreleaser.com/) to build the binaries.\n\n\nTo simply build for development purposes:\n\n```bash\ngoreleaser build --clean --snapshot\n```\n\n## Development\n\nThere are go modules included on this project, so you will need to make sure you run `go mod vendor` to bring them to\nyour local directory if you are using the Makefile as the makefile prefers the use of the vendor directory.\n\nIf you are simply running `go run main.go` the modules will be pulled from vendor or your go root depending on where it\nfinds it. Golang will also automatically pull the mods down when you run if there are changes.\n\nDuring iterative updates if the modules change you will find yourself needing to run `go mod vendor` or at least\n`go mod download` to ensure you have the updated modules locally.\n\n### Ignore Files\n\nThere are two types of ignore files. `IgnoreOnCreate` and `IgnoreAlways`, both are defined in [pkg/common/constants.go](pkg/common/constants.go).\nFiles that should go in the `IgnoreOnCreate` are things like `.DS_Store`, whereas files that should go into\n`IgnoreAlways` is the `sans-integrity.yml` and `sans-integrity.yml.gpg`\n\nChanging the ignore files will require a new release of the tool.\n\n**Note:** to aid developers, the option `-i` is present that allows you to pass a custom ignore strictly for development\npurposes while testing and developing on the tool. This is useful when needing to ensure the validation tool is properly\npicking up files that are not in the file. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsans-sroc%2Fintegrity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsans-sroc%2Fintegrity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsans-sroc%2Fintegrity/lists"}