{"id":37819970,"url":"https://github.com/kinvolk/seccompagent","last_synced_at":"2026-01-16T15:41:11.506Z","repository":{"id":39800207,"uuid":"307324675","full_name":"kinvolk/seccompagent","owner":"kinvolk","description":"agent for handling seccomp descriptors for container runtimes","archived":false,"fork":false,"pushed_at":"2024-02-01T11:44:14.000Z","size":14222,"stargazers_count":41,"open_issues_count":13,"forks_count":10,"subscribers_count":20,"default_branch":"main","last_synced_at":"2024-06-19T01:28:25.776Z","etag":null,"topics":["containers","kinvolk","seccomp"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kinvolk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-26T09:42:53.000Z","updated_at":"2024-04-16T03:52:54.000Z","dependencies_parsed_at":"2023-12-13T13:25:18.332Z","dependency_job_id":"1f72b662-54fa-4e5b-b830-cfb70bffe03d","html_url":"https://github.com/kinvolk/seccompagent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kinvolk/seccompagent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinvolk%2Fseccompagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinvolk%2Fseccompagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinvolk%2Fseccompagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinvolk%2Fseccompagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kinvolk","download_url":"https://codeload.github.com/kinvolk/seccompagent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kinvolk%2Fseccompagent/sbom","scorecard":{"id":560998,"data":{"date":"2025-08-11","repo":{"name":"github.com/kinvolk/seccompagent","commit":"f15b9f96a5060fb9be27ff2e07bc65f00be0909a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/seccompagent.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/seccompagent.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/kinvolk/seccompagent/seccompagent.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/seccompagent.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kinvolk/seccompagent/seccompagent.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:9: pin your Docker image by updating alpine:latest to alpine:latest@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: falco-plugin/Dockerfile:2","Warn: containerImage not pinned by hash: falco-plugin/Dockerfile:11: pin your Docker image by updating falcosecurity/falco-no-driver:0.35.1 to falcosecurity/falco-no-driver:0.35.1@sha256:99478d303b189ea933d50a45c422f91abae167e9e52485f3d12bcc3f5a34cd69","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-3110 / GHSA-jfvp-7x6p-h2pv","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T13:40:49.694Z","repository_id":39800207,"created_at":"2025-08-20T13:40:49.694Z","updated_at":"2025-08-20T13:40:49.694Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","kinvolk","seccomp"],"created_at":"2026-01-16T15:41:10.793Z","updated_at":"2026-01-16T15:41:11.485Z","avatar_url":"https://github.com/kinvolk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kinvolk Seccomp Agent\n\nThe Kinvolk Seccomp Agent is receiving seccomp file descriptors from container runtimes and handling system calls on behalf of the containers.\nIts goal is to support different use cases:\n- unprivileged container builds (procfs mounts with masked entries)\n- support of safe mknod (e.g. /dev/null)\n\nIt is possible to write your own seccomp agent with a different behaviour by reusing the packages in the `pkg/` directory.\nThe Kinvolk Seccomp Agent is only about 100 lines of code. It relies on different packages:\n- `pkg/agent`: listens on a unix socket to receive new seccomp file descriptors from the container runtime and associates a registry to them\n- `pkg/handlers`: basic implementations of system call handlers, such as mkdir, mount...\n- `pkg/kuberesolver`: allows users to assign a custom registry to the seccomp fd depending on the Kubernetes pod.\n- `pkg/nsenter`: allows handlers implementations to execute code in different namespaces\n- `pkg/readarg`: allows handlers implementations to dereference system call arguments.\n- `pkg/registry`: a set of system call handlers associated to a seccomp file descriptor.\n\n## Basic demo\n\n* Run the Seccomp Agent with the \"demo-basic\" container resolver.\n```\nsudo ./seccompagent -resolver=demo-basic\n```\n\nDemo of mount in a container without `CAP_SYS_ADMIN`:\n```\n/ # mount -t proc proc root\n/ # ls /root/self/cmdline\n/root/self/cmdline\n```\n\n* Demo of overriding a `mkdir` path:\n```\n/ # mkdir /abc\n/ # ls -1d /ab*\n/abc-pid-4072889\n```\n\n* Demo of overriding a `chmod` error:\n```\n/ # chmod 777 /\nchmod: /: Bad message\n```\n\n## Demo on Kubernetes\nBefore you install the demo on k8s, please ensure all [the requirements](./docs/install.md) are satisfied.\n\nThis demo shows that the Seccomp Agent can have different behaviour depending on the Kubernetes pod (in this case, the pod's namespace and name).\n\n* Install a seccomp policy: `/var/lib/kubelet/seccomp/notify.json`\n```\n{\n   \"architectures\" : [\n      \"SCMP_ARCH_X86\",\n      \"SCMP_ARCH_X32\"\n   ],\n   \"defaultAction\" : \"SCMP_ACT_ALLOW\",\n   \"listenerPath\": \"/run/seccomp-agent.socket\",\n   \"listenerMetadata\": \"MKDIR_TMPL=-{{.Namespace}}-{{.Pod}}-{{.Container}}\\nEXEC_PATTERN=/bin/true\\nEXEC_DURATION=2s\\nMOUNT_PROC=true\",\n   \"syscalls\" : [\n      {\n         \"action\" : \"SCMP_ACT_NOTIFY\",\n         \"names\" : [\n            \"openat\",\n            \"open\",\n            \"mkdir\",\n            \"mount\",\n\t    \"chmod\"\n         ]\n      }\n   ]\n}\n```\n\n* Deploy the seccomp agent:\n```\nkubectl apply -f deploy/seccompagent.yaml\n```\n\n* Deploy a pod with the seccomp policy:\n```\napiVersion: v1\nkind: Pod\nmetadata:\n  name: mynotifypod\n  # For older versions of Kubernetes (this annotation was deprecated in\n  # Kubernetes v1.19 and completely removed in v1.27):\n  annotations:\n    seccomp.security.alpha.kubernetes.io/pod: localhost/notify.json\nspec:\n  restartPolicy: Never\n  securityContext:\n    # /var/lib/kubelet/seccomp/notify.json\n    seccompProfile:\n      type: Localhost\n      localhostProfile: notify.json\n  containers:\n  - name: container1\n    image: busybox\n    command: [\"sh\"]\n    args: [\"-c\", \"sleep infinity\"]\n```\n\n* Run commands in the pod:\n```\n$ kubectl exec -it mynotifypod -- /bin/sh\n/ # mkdir /abc\n/ # ls -1d /abc*\n/abc-default-mynotifypod-TODO\n/ # mount -t proc proc root\n/ # mount|grep /root\nproc on /root type proc (rw,relatime)\n/ # time -f %E /bin/echo -n \"\"\n0m 0.00s\n/ # time -f %E /bin/true\n0m 2.00s\n```\n\n## Combining with user namespaces\n\nBy combining this with Kubernetes's user namespace support it is possible to\nallow a user within a user namespace to perform some operations which would\notherwise be limited to host root.\n\nOne example is mounting other filesystem types. This is most useful combined\nwith user namespaces to allow mounting network file systems while a pod is\nrunning. This is far safer than giving the container `privileged` access but\ndoes expose more of the kernel to the pod, so you should consider your security\ncarefully.\n\nThere is a possibility a process could change its user namespace after making\nthe mount system call, which could result in a confusing state. To fix this the\nseccomp notify policy should use the SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV\nflag, however this is [not yet available in\nrunc](https://github.com/opencontainers/runc/issues/3860) and requires Linux \u003e=\n5.19.\n\nConfigure a policy, similar to above, but with the following metadata:\n```json\n{\n   \"architectures\" : [\n      \"SCMP_ARCH_X86\",\n      \"SCMP_ARCH_X32\"\n   ],\n   \"defaultAction\" : \"SCMP_ACT_ALLOW\",\n   \"listenerPath\": \"/run/seccomp-agent.socket\",\n   \"listenerMetadata\": \"MOUNT_OTHER_FS_LIST=cifs\\nMOUNT_NEED_CAP_ADMIN=true\",\n   \"syscalls\" : [\n      {\n         \"action\" : \"SCMP_ACT_NOTIFY\",\n         \"names\" : [\n            \"mount\"\n         ]\n      },\n      {\n         \"action\" : \"SCMP_ACT_ALLOW\",\n         \"names\" : [\n            \"umount\"\n         ]\n      }\n   ]\n}\n```\n\n(Policy cut down for sake of example, recommended to use a full policy that\nadditionally configures notify for mount and allows umount.)\n\nThis has currently been successfully tested with cifs. Other filesystem types\nshould work; NFS will need NFS client utilities installing within the container\n*and* on the host (e.g. to make upcalls work).\n\n* Deploy a pod with the seccomp policy and user namespaces:\n```yaml\napiVersion: v1\nkind: Pod\nmetadata:\n  name: mynotifypod-userns\nspec:\n  restartPolicy: Never\n  # Needs \"UserNamespacesSupport\" feature gate currently\n  hostUsers: false\n  securityContext:\n    # /var/lib/kubelet/seccomp/notify.json\n    seccompProfile:\n      type: Localhost\n      localhostProfile: notify.json\n  containers:\n  - name: container1\n    image: alpine\n    command: [\"sh\"]\n    args: [\"-c\", \"sleep infinity\"]\n    securityContext:\n      capabilities:\n        # This is safe combined with hostUsers: false\n        add: [SYS_ADMIN]\n```\n\n* Run commands in the pod:\n```shell\n$ kubectl exec -it mynotifypod-userns -- /bin/sh\n/ # mkdir /mnt\n/ # mount -t cifs -o username=user,password=pass '//10.0.0.1/C' /mnt\n/ # df -h /mnt\n/mnt # df -h /mnt\nFilesystem                Size      Used Available Use% Mounted on\n//10.0.0.1/C           95.4G     85.3G     10.1G  89% /mnt\n/ # ls /mnt\n$Recycle.Bin               Documents and Settings     Program files\n[...]\n/ # sed -i 's!^\\(nobody.*/\\)false!\\1sh!' /etc/passwd\n/ # su nobody\n/ $ mount -t cifs -o username=user,password=pass '//10.0.0.1/C' /mnt\nmount: permission denied (are you root?)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinvolk%2Fseccompagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkinvolk%2Fseccompagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkinvolk%2Fseccompagent/lists"}