Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ labels:
body:
- type: textarea
attributes:
label: Version of privateer
description: The version of privateer you're experiencing the bug on.
label: Version of pvtr
description: The version of pvtr you're experiencing the bug on.
validations:
required: true

Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ __debug_bin
# IntelliJ
.idea

# privateer
# pvtr
pvtr_output
pvtr
pvtr.exe
pvtr-darwin
# legacy binary names
privateer_output
privateer
privateer.exe
Expand Down
7 changes: 4 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ changelog:
- "^test:"

brews:
- name: privateer
- name: pvtr
repository:
owner: privateerproj
name: homebrew-tap
Expand All @@ -58,9 +58,10 @@ brews:
description: "A pluggable compliance testing framework"
license: "Apache-2.0"
install: |
bin.install "privateer"
bin.install "pvtr"
bin.install_symlink "pvtr" => "privateer"
test: |
system "#{bin}/privateer", "version"
system "#{bin}/pvtr", "version"

release:
prerelease: auto
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ FROM alpine:3.21

WORKDIR /app

COPY --from=build /app/privateer /app/privateer
COPY --from=build /app/pvtr /app/pvtr

CMD ["/app/privateer", "--help"]
CMD ["/app/pvtr", "--help"]
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Ref: https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications

BUILD_FLAGS=-X 'main.GitCommitHash=`git rev-parse --short HEAD`' -X 'main.BuiltAt=`date +%FT%T%z`' -X 'main.Version=`git describe --tags`'
BUILD_WIN=@env GOOS=windows GOARCH=amd64 go build -o privateer-windows.exe
BUILD_LINUX=@env GOOS=linux GOARCH=amd64 go build -o privateer-linux
BUILD_MAC=@env GOOS=darwin GOARCH=amd64 go build -o privateer-darwin
BUILD_WIN=@env GOOS=windows GOARCH=amd64 go build -o pvtr-windows.exe
BUILD_LINUX=@env GOOS=linux GOARCH=amd64 go build -o pvtr-linux
BUILD_MAC=@env GOOS=darwin GOARCH=amd64 go build -o pvtr-darwin

build: tidy test binary
testcov: test test-cov
release: tidy test release-nix release-win release-mac

binary:
@echo " > Building binary ..."
go build -o privateer -ldflags="$(BUILD_FLAGS)"
go build -o pvtr -ldflags="$(BUILD_FLAGS)"

test:
@echo " > Validating code ..."
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Privateer
# pvtr

**Privateer** is a validation framework that simplifies infrastructure testing and compliance validation. Built with infrastructure engineers in mind, Privateer helps accelerate security and compliance validation of any software asset.
**pvtr** is a validation framework that simplifies infrastructure testing and compliance validation. Built with infrastructure engineers in mind, pvtr helps accelerate security and compliance validation of any software asset.

## Key Features

Expand All @@ -22,7 +22,7 @@ Click the star at the top right of this page so that you can find it easily the
#### Option 1: Install via Homebrew

```bash
brew install privateerproj/tap/privateer
brew install privateerproj/tap/pvtr
```

#### Option 2: Install via Script
Expand Down Expand Up @@ -52,7 +52,7 @@ We do not currently maintain an authoritative list of community plugins, but a g

Plugin installation is currently left to the user. The default location for plugin binaries is `$HOME/.privateer/bin`. You may specify a different location at runtime via `--binaries-path` if you install your plugins elsewhere.

To review the plugins you have installed, run `privateer list -a`.
To review the plugins you have installed, run `pvtr list -a`.

## Contributing

Expand All @@ -62,7 +62,7 @@ All contributions are covered by the [Apache 2 License](https://github.com/priva

### Local Development Prerequisites

- **Go 1.25.1 or later** - Required for building Privateer and running tests
- **Go 1.25.1 or later** - Required for building pvtr and running tests
- **Make** - For using the Makefile build targets

### Testing
Expand Down Expand Up @@ -91,7 +91,7 @@ make testcov
### Project Structure

```bash
privateer/
pvtr/
├── cmd/ # CLI commands (run, list, generate-plugin, etc.)
├── test/ # Test data and fixtures
├── build/ # Build scripts and CI configurations
Expand All @@ -105,6 +105,6 @@ For vulnerability reporting, please reference our [Security Policy](https://gith

## Helpful Links

- **[Privateer SDK](https://github.com/privateerproj/privateer-sdk)** - SDK for developing Privateer plugins
- **[Privateer SDK](https://github.com/privateerproj/privateer-sdk)** - SDK for developing pvtr plugins
- **[Privateer Documentation](https://privateerproj.com)** - Complete documentation site
- **[Example Plugin](https://github.com/privateerproj/raid-wireframe)** - Reference implementation
2 changes: 1 addition & 1 deletion cmd/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func discoverPluginNames(pluginsDir string) string {
var names []string
for _, p := range pluginPaths {
name := filepath.Base(p)
if strings.Contains(name, "privateer") {
if strings.Contains(name, "pvtr") || strings.Contains(name, "privateer") {
continue
}
names = append(names, name)
Expand Down
11 changes: 7 additions & 4 deletions cmd/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestEnvCmd_ShowsBinaryPath(t *testing.T) {
}

func TestDiscoverPluginNames_EmptyDir(t *testing.T) {
tmpDir, err := os.MkdirTemp("", "privateer-test-*")
tmpDir, err := os.MkdirTemp("", "pvtr-test-*")
if err != nil {
t.Fatalf("failed to create temp dir: %v", err)
}
Expand All @@ -104,14 +104,14 @@ func TestDiscoverPluginNames_NonexistentDir(t *testing.T) {
}
}

func TestDiscoverPluginNames_FiltersPrivateer(t *testing.T) {
tmpDir, err := os.MkdirTemp("", "privateer-test-*")
func TestDiscoverPluginNames_FiltersPvtrAndPrivateer(t *testing.T) {
tmpDir, err := os.MkdirTemp("", "pvtr-test-*")
if err != nil {
t.Fatalf("failed to create temp dir: %v", err)
}
defer func() { _ = os.RemoveAll(tmpDir) }()

for _, name := range []string{"privateer", "privateer-foo", "my-plugin", "other-tool"} {
for _, name := range []string{"pvtr", "pvtr-foo", "privateer", "privateer-foo", "my-plugin", "other-tool"} {
path := filepath.Join(tmpDir, name)
if err := os.WriteFile(path, []byte("#!/bin/sh\n"), 0755); err != nil {
t.Fatalf("failed to create file %s: %v", name, err)
Expand All @@ -120,6 +120,9 @@ func TestDiscoverPluginNames_FiltersPrivateer(t *testing.T) {

result := discoverPluginNames(tmpDir)

if strings.Contains(result, "pvtr") {
t.Errorf("expected pvtr binaries to be filtered out, got: %s", result)
}
if strings.Contains(result, "privateer") {
t.Errorf("expected privateer binaries to be filtered out, got: %s", result)
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/execute.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package cmd provides the command-line interface for Privateer.
// Package cmd provides the command-line interface for pvtr.
// It defines the root command and all subcommands, handles configuration,
// and manages the execution flow of the application.
package cmd
Expand Down Expand Up @@ -30,10 +30,10 @@ var (
writer *tabwriter.Writer

// rootCmd represents the base command when called without any subcommands.
// It is the entry point for all Privateer commands and handles global configuration.
// It is the entry point for all pvtr commands and handles global configuration.
rootCmd = &cobra.Command{
Use: "privateer",
Short: "privateer root command",
Use: "pvtr",
Short: "pvtr root command",
PersistentPreRun: persistentPreRun,
}
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate-plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

var (
// genPluginCmd represents the generate-plugin command.
// It generates a new Privateer plugin from a source file using templates.
// It generates a new pvtr plugin from a source file using templates.
genPluginCmd = &cobra.Command{
Use: "generate-plugin",
Short: "Generate a new plugin",
Expand Down
4 changes: 2 additions & 2 deletions cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
)

// versionCmd represents the version command, which displays version information
// about the Privateer build including version, commit hash, and build time.
// about the pvtr build including version, commit hash, and build time.
var versionCmd = &cobra.Command{
Use: "version",
Short: "Display version details.",
Long: `Display the version, git commit hash, and build timestamp of this Privateer build. Use the --verbose flag to see all details.`,
Long: `Display the version, git commit hash, and build timestamp of this pvtr build. Use the --verbose flag to see all details.`,
Run: func(cmd *cobra.Command, args []string) {
if viper.GetBool("verbose") {
_, _ = fmt.Fprintf(writer, "Version:\t%s\n", buildVersion)
Expand Down
8 changes: 4 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e

# Constants
DEFAULT_INSTALL_DIR="$HOME/.privateer/bin"
PRIVATEER_REPO="privateerproj/privateer"
LATEST_RELEASE_URL="https://api.github.com/repos/${PRIVATEER_REPO}/releases/latest"
PVTR_REPO="privateerproj/privateer"
LATEST_RELEASE_URL="https://api.github.com/repos/${PVTR_REPO}/releases/latest"

# Detect OS (darwin = macOS, linux = Linux, msys or cygwin = Windows)
OS=""
Expand Down Expand Up @@ -45,7 +45,7 @@ esac

download_latest_release() {
local install_dir="$1"
local install_file="$install_dir/privateer"
local install_file="$install_dir/pvtr"

# Ensure the directory exists
mkdir -p "$install_dir"
Expand Down Expand Up @@ -147,7 +147,7 @@ main() {
# Ensure the binary is accessible via PATH
update_path "$install_dir"

echo "Privateer installation complete!"
echo "pvtr installation complete!"
}

main "$@"
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Package main provides the entry point for the Privateer command-line tool.
// Privateer is a security testing framework that executes plugins to perform
// security evaluations and assessments.
// Package main provides the entry point for the pvtr command-line tool.
// pvtr is a validation framework that executes plugins to perform
// compliance and security evaluations.
package main

import (
Expand Down Expand Up @@ -39,7 +39,7 @@ func setVCSInfo() {
}
}

// main is the entry point for the Privateer application.
// main is the entry point for the pvtr application.
// It formats the version string with any postfix and executes the root command.
func main() {
if Version == "" {
Expand Down
18 changes: 9 additions & 9 deletions test/integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ if [ -z "$GITHUB_TOKEN" ]; then
exit 1
fi

# Run basic privateer commands to verify installation
./privateer completion || STATUS=1
./privateer env || STATUS=1
./privateer help || STATUS=1
./privateer list || STATUS=1
./privateer version || STATUS=1
# Run basic pvtr commands to verify installation
./pvtr completion || STATUS=1
./pvtr env || STATUS=1
./pvtr help || STATUS=1
./pvtr list || STATUS=1
./pvtr version || STATUS=1

# Detect OS and architecture
OS=$(uname -s)
Expand Down Expand Up @@ -74,7 +74,7 @@ gh release download \

tar xzf "/tmp/$ASSET_PATTERN" -C "$PLUGIN_DIR" || { echo "ERROR: Failed to extract plugin"; exit 1; }

# Generate config for testing against the privateer repo
# Generate config for testing against the repo
cat > "$CONFIG_FILE" <<EOF
loglevel: trace
write-directory: evaluation_results
Expand All @@ -94,7 +94,7 @@ services:
token: ${GITHUB_TOKEN}
EOF

# Run privateer with the plugin
./privateer run -b "$PLUGIN_DIR" -c "$CONFIG_FILE" || STATUS=1
# Run pvtr with the plugin
./pvtr run -b "$PLUGIN_DIR" -c "$CONFIG_FILE" || STATUS=1

exit $STATUS
Loading