From df9c94803c82404a5f3e3039968775aa9a401e84 Mon Sep 17 00:00:00 2001 From: Ryan Parman Date: Mon, 19 Feb 2024 09:16:22 -0700 Subject: [PATCH] docs: Generate manpages for CLI tool. --- docs/man/devsec-tools-completion-bash.1 | 71 +++++++++++++++++ docs/man/devsec-tools-completion-fish.1 | 60 +++++++++++++++ docs/man/devsec-tools-completion-powershell.1 | 53 +++++++++++++ docs/man/devsec-tools-completion-zsh.1 | 76 +++++++++++++++++++ docs/man/devsec-tools-completion.1 | 38 ++++++++++ docs/man/devsec-tools-dockerfile-hasher.1 | 55 ++++++++++++++ docs/man/devsec-tools-version.1 | 38 ++++++++++ docs/man/devsec-tools.1 | 40 ++++++++++ 8 files changed, 431 insertions(+) create mode 100644 docs/man/devsec-tools-completion-bash.1 create mode 100644 docs/man/devsec-tools-completion-fish.1 create mode 100644 docs/man/devsec-tools-completion-powershell.1 create mode 100644 docs/man/devsec-tools-completion-zsh.1 create mode 100644 docs/man/devsec-tools-completion.1 create mode 100644 docs/man/devsec-tools-dockerfile-hasher.1 create mode 100644 docs/man/devsec-tools-version.1 create mode 100644 docs/man/devsec-tools.1 diff --git a/docs/man/devsec-tools-completion-bash.1 b/docs/man/devsec-tools-completion-bash.1 new file mode 100644 index 0000000..f109fbb --- /dev/null +++ b/docs/man/devsec-tools-completion-bash.1 @@ -0,0 +1,71 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-completion-bash - Generate the autocompletion script for bash + + +.SH SYNOPSIS +.PP +\fBdevsec-tools completion bash\fP + + +.SH DESCRIPTION +.PP +Generate the autocompletion script for the bash shell. + +.PP +This script depends on the 'bash-completion' package. +If it is not installed already, you can install it via your OS's package manager. + +.PP +To load completions in your current shell session: + +.EX +source <(devsec-tools completion bash) + +.EE + +.PP +To load completions for every new session, execute once: + +.SS Linux: +.EX +devsec-tools completion bash > /etc/bash_completion.d/devsec-tools + +.EE + +.SS macOS: +.EX +devsec-tools completion bash > $(brew --prefix)/etc/bash_completion.d/devsec-tools + +.EE + +.PP +You will need to start a new shell for this setup to take effect. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for bash + +.PP +\fB--no-descriptions\fP[=false] + disable completion descriptions + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools-completion(1)\fP diff --git a/docs/man/devsec-tools-completion-fish.1 b/docs/man/devsec-tools-completion-fish.1 new file mode 100644 index 0000000..882bd2c --- /dev/null +++ b/docs/man/devsec-tools-completion-fish.1 @@ -0,0 +1,60 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-completion-fish - Generate the autocompletion script for fish + + +.SH SYNOPSIS +.PP +\fBdevsec-tools completion fish [flags]\fP + + +.SH DESCRIPTION +.PP +Generate the autocompletion script for the fish shell. + +.PP +To load completions in your current shell session: + +.EX +devsec-tools completion fish | source + +.EE + +.PP +To load completions for every new session, execute once: + +.EX +devsec-tools completion fish > ~/.config/fish/completions/devsec-tools.fish + +.EE + +.PP +You will need to start a new shell for this setup to take effect. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for fish + +.PP +\fB--no-descriptions\fP[=false] + disable completion descriptions + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools-completion(1)\fP diff --git a/docs/man/devsec-tools-completion-powershell.1 b/docs/man/devsec-tools-completion-powershell.1 new file mode 100644 index 0000000..ba92674 --- /dev/null +++ b/docs/man/devsec-tools-completion-powershell.1 @@ -0,0 +1,53 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-completion-powershell - Generate the autocompletion script for powershell + + +.SH SYNOPSIS +.PP +\fBdevsec-tools completion powershell [flags]\fP + + +.SH DESCRIPTION +.PP +Generate the autocompletion script for powershell. + +.PP +To load completions in your current shell session: + +.EX +devsec-tools completion powershell | Out-String | Invoke-Expression + +.EE + +.PP +To load completions for every new session, add the output of the above command +to your powershell profile. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for powershell + +.PP +\fB--no-descriptions\fP[=false] + disable completion descriptions + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools-completion(1)\fP diff --git a/docs/man/devsec-tools-completion-zsh.1 b/docs/man/devsec-tools-completion-zsh.1 new file mode 100644 index 0000000..72494d1 --- /dev/null +++ b/docs/man/devsec-tools-completion-zsh.1 @@ -0,0 +1,76 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-completion-zsh - Generate the autocompletion script for zsh + + +.SH SYNOPSIS +.PP +\fBdevsec-tools completion zsh [flags]\fP + + +.SH DESCRIPTION +.PP +Generate the autocompletion script for the zsh shell. + +.PP +If shell completion is not already enabled in your environment you will need +to enable it. You can execute the following once: + +.EX +echo "autoload -U compinit; compinit" >> ~/.zshrc + +.EE + +.PP +To load completions in your current shell session: + +.EX +source <(devsec-tools completion zsh) + +.EE + +.PP +To load completions for every new session, execute once: + +.SS Linux: +.EX +devsec-tools completion zsh > "${fpath[1]}/_devsec-tools" + +.EE + +.SS macOS: +.EX +devsec-tools completion zsh > $(brew --prefix)/share/zsh/site-functions/_devsec-tools + +.EE + +.PP +You will need to start a new shell for this setup to take effect. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for zsh + +.PP +\fB--no-descriptions\fP[=false] + disable completion descriptions + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools-completion(1)\fP diff --git a/docs/man/devsec-tools-completion.1 b/docs/man/devsec-tools-completion.1 new file mode 100644 index 0000000..b71896a --- /dev/null +++ b/docs/man/devsec-tools-completion.1 @@ -0,0 +1,38 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-completion - Generate the autocompletion script for the specified shell + + +.SH SYNOPSIS +.PP +\fBdevsec-tools completion [flags]\fP + + +.SH DESCRIPTION +.PP +Generate the autocompletion script for devsec-tools for the specified shell. +See each sub-command's help for details on how to use the generated script. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for completion + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools(1)\fP, \fBdevsec-tools-completion-bash(1)\fP, \fBdevsec-tools-completion-fish(1)\fP, \fBdevsec-tools-completion-powershell(1)\fP, \fBdevsec-tools-completion-zsh(1)\fP diff --git a/docs/man/devsec-tools-dockerfile-hasher.1 b/docs/man/devsec-tools-dockerfile-hasher.1 new file mode 100644 index 0000000..f94ec4f --- /dev/null +++ b/docs/man/devsec-tools-dockerfile-hasher.1 @@ -0,0 +1,55 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-dockerfile-hasher - Rewrites a Dockerfile with SHA256 digests of the images. + + +.SH SYNOPSIS +.PP +\fBdevsec-tools dockerfile-hasher [flags]\fP + + +.SH DESCRIPTION +.PP +Since Docker tags can be re-pointed to different images, it is often useful +to rewrite the Dockerfile with the SHA256 digest of the image. + +.PP +This command reads the contents of the Dockerfile from disk and parses it +into an Abstract Syntax Tree (AST). It then rewrites the lines in the +Dockerfile with the SHA256 digest of the image. + +.PP +This is described (briefly) in the Center for Internet Security (CIS) Docker +Benchmark, in section ยง6.1. + + +.SH OPTIONS +.PP +\fB-f\fP, \fB--dockerfile\fP="Dockerfile" + Path to the Dockerfile to parse/rewrite. + +.PP +\fB-h\fP, \fB--help\fP[=false] + help for dockerfile-hasher + +.PP +\fB-w\fP, \fB--write\fP[=false] + Write the changes back to the Dockerfile. + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools(1)\fP diff --git a/docs/man/devsec-tools-version.1 b/docs/man/devsec-tools-version.1 new file mode 100644 index 0000000..49cf070 --- /dev/null +++ b/docs/man/devsec-tools-version.1 @@ -0,0 +1,38 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "Auto generated by spf13/cobra" "" + +.SH NAME +.PP +devsec-tools-version - Long-form version information. + + +.SH SYNOPSIS +.PP +\fBdevsec-tools version [flags]\fP + + +.SH DESCRIPTION +.PP +Long-form version information, including the build commit hash, build +date, Go version, and external dependencies. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for version + + +.SH OPTIONS INHERITED FROM PARENT COMMANDS +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools(1)\fP diff --git a/docs/man/devsec-tools.1 b/docs/man/devsec-tools.1 new file mode 100644 index 0000000..04a6378 --- /dev/null +++ b/docs/man/devsec-tools.1 @@ -0,0 +1,40 @@ +.nh +.TH "devsec-tools" "1" "Feb 2024" "" "" + +.SH NAME +.PP +devsec-tools - A set of useful tools for DevSecOps workflows. + + +.SH SYNOPSIS +.PP +\fBdevsec-tools [flags]\fP + + +.SH DESCRIPTION +.PP +DevSec Tools is a suite of tools that are useful for DevSecOps workflows. +Its goal is to simplify and streamline the process of developing, +securing, and operating software and systems for the web. + +.PP +You can also find these tools online at https://devsec.tools. + + +.SH OPTIONS +.PP +\fB-h\fP, \fB--help\fP[=false] + help for devsec-tools + +.PP +\fB-q\fP, \fB--quiet\fP[=false] + Disable all logging output. + +.PP +\fB-v\fP, \fB--verbose\fP[=false] + Enable verbose output. + + +.SH SEE ALSO +.PP +\fBdevsec-tools-completion(1)\fP, \fBdevsec-tools-dockerfile-hasher(1)\fP, \fBdevsec-tools-version(1)\fP