Skip to content

Enable snippet functionality#68

Merged
glenn-operant merged 4 commits intodevfrom
enable-snippet-functionality
Jun 13, 2024
Merged

Enable snippet functionality#68
glenn-operant merged 4 commits intodevfrom
enable-snippet-functionality

Conversation

@glenn-operant
Copy link
Copy Markdown
Collaborator

@glenn-operant glenn-operant commented Jun 13, 2024

Adds functionality to output a list of available experiments/components, and output a template of them to allow users a starting point.

Also improves our table output, by capturing the size of the term and adjusting the column size accordingly. Or truncating if anything is too long. This preserves a nicely formatted table if anything is too long for the term size.

 ./bin/secops-chaos experiment
┌───────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────┐
│Type                               │Description                                                                                           │
├───────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│host-path-mount                    │Mount a sensitive host filesystem path into a container                                               │
│cluster-admin-binding              │Create a container with the cluster-admin role binding attached                                       │
│credential-access-container-secrets│Add secrets to a config map and within a container's environment variables                            │
│remote-execute-api                 │Runs a deployment based on a configurable image and then verifies based off of API calls to that image│
│execute_api                        │This experiment port forwards to a service running in Kubernetes and issues API calls to that service │
│list-kubernetes-secrets            │List Kubernetes secrets in namespaces from within a container                                         │
│privileged-container               │Run a privileged container in a namespace                                                             │
└───────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┘
❯ ./bin/secops-chaos experiment snippet -e host-path-mount
experiments:
  - metadata:
      name: host-path-volume
      type: host-path-mount
      namespace: default
    parameters:
      hostPath:
        path: /proc

@priyanka-operant
Copy link
Copy Markdown
Collaborator

nice!

@glenn-operant glenn-operant merged commit b52fbc0 into dev Jun 13, 2024
@glenn-operant glenn-operant deleted the enable-snippet-functionality branch January 2, 2025 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants