This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| repos: | |
| - repo: local | |
| hooks: | |
| - id: restricted-filenames | |
| name: Check commits for unexpected file extensions | |
| entry: These file extensions are unusual and should be checked | |
| language: fail | |
| files: '.*\.(xlsx|doc)' | |
| - id: restricted-file-types | |
| name: Check commits for unexpected file types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## command | |
| conftest test -i ini samples/multiple-repos-broken.repo | |
| ## Policy | |
| cat policy/yum-repo-security-settings.rego | |
| package main | |
| deny[msg] { | |
| reponame := input[_] # gets the contents of the structure, not the [foo] value. | |
| not input[reponame].gpgcheck = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| deny[msg] { | |
| input[i].Cmd == "from" | |
| val := input[i].Value | |
| image := val[0] | |
| trace(image) | |
| not re_match(".+@sha256:.{64}$", image) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## cat main.tf | |
| variable "vpc_id" { | |
| type = string | |
| description = "VPC ID to deploy to" | |
| validation { | |
| #condition = can(regex("^vpc-", var.vpc_id)) | |
| condition = length(var.vpc_id) > 4 && substr(var.vpc_id, 0, 4) == "vpc-" | |
| error_message = "The vpc_id must be a valid VPC ID of the form 'vpc-'." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extern crate rand; | |
| use rand::Rng; | |
| use std::cmp::Ordering; | |
| use std::io; | |
| fn main() { | |
| println!("Guess the number!"); | |
| let secret_number = rand::thread_rng().gen_range(1, 101); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.0.212.34 | |
| 1.179.185.50 | |
| 1.186.57.150 | |
| 1.194.238.187 | |
| 1.202.76.226 | |
| 1.202.77.210 | |
| 1.209.229.179 | |
| 1.214.156.164 | |
| 1.214.220.227 | |
| 1.214.245.27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat ipset-fail2ban | |
| ipset -N fail2ban-2020-11-24 iphash | |
| ipset -A fail2ban-2020-11-24 1.0.212.34 | |
| ipset -A fail2ban-2020-11-24 1.186.57.150 | |
| ipset -A fail2ban-2020-11-24 1.202.76.226 | |
| ipset -A fail2ban-2020-11-24 1.214.220.227 | |
| ipset -A fail2ban-2020-11-24 1.245.61.144 | |
| ipset -A fail2ban-2020-11-24 2.184.52.194 | |
| ipset -A fail2ban-2020-11-24 2.228.87.194 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone https://github.com/alphagov/govuk-puppet.git | |
| cd govuk-puppet/ | |
| git log --format=format: --name-only --since=18.month | egrep -v '^$' | sort | uniq -c | sort -nr | head -15 | |
| 198 hieradata/common.yaml | |
| 178 hieradata_aws/common.yaml | |
| 151 hieradata_aws/integration.yaml | |
| 143 Rakefile | |
| 123 hieradata_aws/staging.yaml | |
| 114 hieradata_aws/production.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pdk build | |
| pdk (INFO): This module is not compatible with PDK, so PDK can not validate or test this build. Unvalidated modules may have errors when uploading to the Forge. To make this module PDK compatible and use validate features, cancel the build and run `pdk convert`. | |
| Continue build without converting? no | |
| pdk (INFO): Build cancelled; exiting. | |
| $ pdk convert | |
| ------------Files to be added----------- |
OlderNewer