This repository has been archived by the owner on May 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,8 @@ go install github.com/cugu/[email protected] | |
`gocap generate <path>` prints a valid `go.cap` file. It lists all dependency packages that require critical permissions | ||
like file access, execution rights or network access. | ||
|
||
**! `gocap generate` runs on package basis and the path argument must point to a Go package (there must be .go files) not a Go Module. Also `gocap generate` needs the dependenies downloaded before, e.g. run `go mod download`**. | ||
**! `gocap generate` runs on package basis and the path argument must point to a Go package (there must be .go files) | ||
not a Go Module. Also `gocap generate` needs the dependenies downloaded before, e.g. run `go mod download`**. | ||
|
||
*Example* | ||
|
||
|
@@ -112,3 +113,14 @@ github.com/alecthomas/kong | |
github.com/pkg/errors | ||
unnecessary capability 'network', please remove from go.cap file | ||
``` | ||
|
||
## Capabilities | ||
|
||
| Name | Description | Packages | | ||
|---------|-------------------------------------------------------------------------------------------------------------------------------------|--------------------| | ||
| file | Read and write access to files | os io/ioutil | | ||
| network | Read and write to the network | net net/http | | ||
| execute | Execute other binaries | os/exec reflect | | ||
| runtime | Access system information | runtime | | ||
| syscall | Perform any system call in context of the software. Unsafe might indicate a //go:linkname and login of external C or assembler code | syscall, C, unsafe | | ||
|
This file contains 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