How to: [⏫](#contents) Detect escalated privileges in dependencies with [capslock](https://github.com/google/capslock)
Capslock is a capability analysis CLI for Go packages that informs users of which privileged operations a given package can access. This works by classifying the capabilities of Go packages by following transitive calls to privileged standard library operations. The recent increase in supply chain attacks targeting open source software has highlighted that third party dependencies should not be inherently trusted. Capabilities indicate what permissions a package has access to, and can be used in conjunction with other security signals to indicate which code requires additional scrutiny before it can be considered trusted. — Google

```
capslock -packages=./...
```

Example
```
...
CAPABILITY_ARBITRARY_EXECUTION: 317 references
CAPABILITY_EXEC: 317 references
CAPABILITY_FILES: 318 references
CAPABILITY_MODIFY_SYSTEM_STATE: 20 references
CAPABILITY_NETWORK: 317 references
CAPABILITY_OPERATING_SYSTEM: 124 references
CAPABILITY_READ_SYSTEM_STATE: 317 references
CAPABILITY_REFLECT: 348 references
CAPABILITY_RUNTIME: 317 references
CAPABILITY_SYSTEM_CALLS: 12 references
CAPABILITY_UNANALYZED: 332 references
CAPABILITY_UNSAFE_POINTER: 335 references
```

Requirements
```
go install github.com/google/capslock/cmd/capslock@latest
```