Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update native loading of root programs #245

Merged
merged 27 commits into from Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
30f6092
Update native loading of root programs
sanfern May 23, 2023
dc9b488
minor updates
sanfern Jun 9, 2023
6fbee8b
build(deps): Bump actions/setup-go from 4.0.0 to 4.0.1
dependabot[bot] May 20, 2023
d1095c8
build(deps): Bump github/codeql-action from 2.3.3 to 2.3.6
dependabot[bot] Jun 3, 2023
55ed33c
Update configs from command line argument
sanfern May 15, 2023
c8641c7
update swagger docs
sanfern Jun 2, 2023
dad0a72
Update comments
sanfern Jun 9, 2023
06e943c
build(deps): Bump github/codeql-action from 2.3.6 to 2.13.4
dependabot[bot] Jun 10, 2023
a05f307
build(deps): Bump actions/checkout from 3.5.2 to 3.5.3
dependabot[bot] Jun 10, 2023
07884f9
build(deps): Bump github.com/prometheus/client_golang
dependabot[bot] Jun 17, 2023
4cfb2b7
build(deps): Bump golang.org/x/sys from 0.8.0 to 0.9.0
dependabot[bot] Jun 17, 2023
e84b920
build(deps): Bump ossf/scorecard-action from 2.1.2 to 2.2.0
dependabot[bot] Jun 24, 2023
abed22a
build(deps): Bump step-security/harden-runner from 2.4.0 to 2.4.1
dependabot[bot] Jun 24, 2023
3898651
build(deps): Bump github.com/cilium/ebpf from 0.10.0 to 0.11.0
dependabot[bot] Jul 8, 2023
1080c8a
build(deps): Bump golang.org/x/sys from 0.9.0 to 0.10.0
dependabot[bot] Jul 8, 2023
66e8a95
update latest cilium ebpf version
sanfern Jul 12, 2023
251101b
update reviews comments
sanfern Aug 18, 2023
5d29241
build(deps): Bump step-security/harden-runner from 2.4.1 to 2.5.0
dependabot[bot] Jul 29, 2023
a9509a2
build(deps): Bump github.com/go-chi/chi/v5 from 5.0.8 to 5.0.10
dependabot[bot] Jul 15, 2023
06fc33a
Update codeowners list
sanfern Jun 29, 2023
426e273
build(deps): Bump step-security/harden-runner from 2.5.0 to 2.5.1
dependabot[bot] Aug 12, 2023
5060a8c
build(deps): Bump github.com/rs/zerolog from 1.29.1 to 1.30.0
dependabot[bot] Aug 5, 2023
0084a01
build(deps): Bump golang.org/x/sys from 0.10.0 to 0.11.0
dependabot[bot] Aug 5, 2023
051c17c
build(deps): Bump actions/setup-go from 4.0.1 to 4.1.0
dependabot[bot] Aug 12, 2023
282801f
update review comments
sanfern Aug 25, 2023
1231e54
fix conflicts
sanfern Aug 25, 2023
7d1b5eb
Merge branch 'main' into sanfern-dev-root-progs
sanfern Sep 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci-build-windows.yaml
Expand Up @@ -22,12 +22,12 @@ jobs:

steps:
- name: Setup Go 1.18.6
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: '1.18.6'

- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

Expand All @@ -38,7 +38,7 @@ jobs:
echo "GOPATH=$gopath" >> $env:GITHUB_ENV

- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Format
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yaml
Expand Up @@ -22,12 +22,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Setup Go 1.18.6
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: '1.18.6'

- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

Expand All @@ -37,7 +37,7 @@ jobs:
sudo apt-get install gcc libc-dev bash perl curl make

- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Format
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yaml
Expand Up @@ -34,17 +34,17 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9

- name: Initialize CodeQL
uses: github/codeql-action/init@29b1f65c5e92e24fe6b6647da1eaabe529cec70f
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@29b1f65c5e92e24fe6b6647da1eaabe529cec70f
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a
6 changes: 3 additions & 3 deletions .github/workflows/scorecards-analysis.yml
Expand Up @@ -37,12 +37,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
with:
results_file: results.sarif
results_format: sarif
Expand Down Expand Up @@ -73,6 +73,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard so it will be visible
# at https://github.com/l3af-project/l3afd/security/code-scanning.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@29b1f65c5e92e24fe6b6647da1eaabe529cec70f
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,3 +1,3 @@
# Default Code Owners

* @sanfern @charleskbliu0 @jniesz @dthaler
* @sanfern @charleskbliu0 @jniesz @dthaler @ajayR006
sanfern marked this conversation as resolved.
Show resolved Hide resolved
60 changes: 51 additions & 9 deletions docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 47 additions & 7 deletions docs/swagger.json
Expand Up @@ -177,9 +177,17 @@
"description": "Program stop command",
"type": "string"
},
"cmd_update": {
"description": "Program update config command",
"type": "string"
},
"config_args": {
"description": "Map of arguments to config command",
"$ref": "#/definitions/models.L3afDNFArgs"
"allOf": [
{
"$ref": "#/definitions/models.L3afDNFArgs"
}
]
},
"config_file_path": {
"description": "Config file location",
Expand All @@ -203,7 +211,11 @@
},
"map_args": {
"description": "Config BPF Map of arguments",
"$ref": "#/definitions/models.L3afDNFArgs"
"allOf": [
{
"$ref": "#/definitions/models.L3afDNFArgs"
}
]
},
"map_name": {
"description": "BPF map to store next program fd",
Expand Down Expand Up @@ -242,15 +254,35 @@
},
"start_args": {
"description": "Map of arguments to start command",
"$ref": "#/definitions/models.L3afDNFArgs"
"allOf": [
{
"$ref": "#/definitions/models.L3afDNFArgs"
}
]
},
"status_args": {
"description": "Map of arguments to status command",
"$ref": "#/definitions/models.L3afDNFArgs"
"allOf": [
{
"$ref": "#/definitions/models.L3afDNFArgs"
}
]
},
"stop_args": {
"description": "Map of arguments to stop command",
"$ref": "#/definitions/models.L3afDNFArgs"
"allOf": [
{
"$ref": "#/definitions/models.L3afDNFArgs"
}
]
},
"update_args": {
"description": "Map of arguments to update command",
"allOf": [
{
"$ref": "#/definitions/models.L3afDNFArgs"
}
]
},
"user_program_daemon": {
"description": "User program daemon or not",
Expand Down Expand Up @@ -319,7 +351,11 @@
"properties": {
"bpf_programs": {
"description": "List of eBPF program names to remove",
"$ref": "#/definitions/models.BPFProgramNames"
"allOf": [
{
"$ref": "#/definitions/models.BPFProgramNames"
}
]
},
"host_name": {
"description": "Host name or pod name",
Expand All @@ -336,7 +372,11 @@
"properties": {
"bpf_programs": {
"description": "List of bpf programs",
"$ref": "#/definitions/models.BPFPrograms"
"allOf": [
{
"$ref": "#/definitions/models.BPFPrograms"
}
]
},
"host_name": {
"description": "Host name or pod name",
Expand Down
28 changes: 21 additions & 7 deletions docs/swagger.yaml
Expand Up @@ -23,8 +23,12 @@ definitions:
cmd_stop:
description: Program stop command
type: string
cmd_update:
description: Program update config command
type: string
config_args:
$ref: '#/definitions/models.L3afDNFArgs'
allOf:
- $ref: '#/definitions/models.L3afDNFArgs'
description: Map of arguments to config command
config_file_path:
description: Config file location
Expand All @@ -42,7 +46,8 @@ definitions:
description: User program is plugin or not
type: boolean
map_args:
$ref: '#/definitions/models.L3afDNFArgs'
allOf:
- $ref: '#/definitions/models.L3afDNFArgs'
description: Config BPF Map of arguments
map_name:
description: BPF map to store next program fd
Expand Down Expand Up @@ -71,14 +76,21 @@ definitions:
description: Sequence position in the chain
type: integer
start_args:
$ref: '#/definitions/models.L3afDNFArgs'
allOf:
- $ref: '#/definitions/models.L3afDNFArgs'
description: Map of arguments to start command
status_args:
$ref: '#/definitions/models.L3afDNFArgs'
allOf:
- $ref: '#/definitions/models.L3afDNFArgs'
description: Map of arguments to status command
stop_args:
$ref: '#/definitions/models.L3afDNFArgs'
allOf:
- $ref: '#/definitions/models.L3afDNFArgs'
description: Map of arguments to stop command
update_args:
allOf:
- $ref: '#/definitions/models.L3afDNFArgs'
description: Map of arguments to update command
user_program_daemon:
description: User program daemon or not
type: boolean
Expand Down Expand Up @@ -125,7 +137,8 @@ definitions:
models.L3afBPFProgramNames:
properties:
bpf_programs:
$ref: '#/definitions/models.BPFProgramNames'
allOf:
- $ref: '#/definitions/models.BPFProgramNames'
description: List of eBPF program names to remove
host_name:
description: Host name or pod name
Expand All @@ -137,7 +150,8 @@ definitions:
models.L3afBPFPrograms:
properties:
bpf_programs:
$ref: '#/definitions/models.BPFPrograms'
allOf:
- $ref: '#/definitions/models.BPFPrograms'
description: List of bpf programs
host_name:
description: Host name or pod name
Expand Down