A daemon that has the purpose of installing and removing policies as they are laid in a specific directory

selinuxd

This a daemon that has the purpose of installing and removing policies as they are laid in a specific directory. This directory is /etc/selinux.d by default.

The intent is to follow a infrastructure-as-code approach for installing SELinux policies. With this, installing policies is a matter of persisting policy files in a specific directory, which the daemon will immediately pick up and try to install them.

Building

Golang 1.15 and GNU make are required. In Fedora 33, the installation is a matter of doing:

$ sudo dnf install golang make libsemanage-devel policycoreutils

With this, you can build the daemon's binary with make build, or simply make. the binary will be persisted to the bin/ directory.

Running

Once you have built the binary, simply do:

$ sudo ./bin/selinuxdctl daemon

or

$ make run

Note that sudo is needed as it'll attempt to install SELinux policies, which requires root. Also note that the run target will attempt to create /etc/selinux.d.

This will:

  • Listen for file changes in the /etc/selinux.d directory

    • When a file is added or modified, it'll attempt to install the policy

    • When a file is removed, it'll uninstall the policy

Testing (for demo purposes)

With the daemon running, do:

$ sudo cp tests/data/testport.cil /etc/selinux.d/

Notice that the policy will be installed in the system shortly:

$ sudo semodule -l | grep testport

Now, remove the policy:

$ sudo rm /etc/selinux.d/testport.cil

Notice that the policy will no longer be there:

$ sudo semodule -l | grep testport

Why?

This enables an easy way to install policies by establishing intent, as opposed to having to tell a system how to do things. This way, all we need to do is tell a system that we want a file in a specific path in the file system, and the rest will be taken care of.

SELinux policies often are used to secure workloads on nodes and should be treated as part of the workload deployment. By getting this daemon to dynamically install and track these policies, we're able to more closely link the policies to the workloads that require them. Policies, in this context, are not configuration files for the node, but instead and statements on how to secure a running workload.

OpenShift/Machine Config Operator

The Machine Config Operator is an operator that ensures that the nodes belonging to an OpenShift cluster are in a certain state.

If this daemon would be running on a node in the cluster, all we would need to do to install a policy is:

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 50-example-sepolicy
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:,%3B%20Declare%20a%20test_port_t%20type%0A%28type%20test_port_t%29%0A%3B%20Assign%20the%20type%20to%20the%20object_r%20role%0A%28roletype%20object_r%20test_port_t%29%0A%0A%3B%20Assign%20the%20right%20set%20of%20attributes%20to%20the%20port%0A%28typeattributeset%20defined_port_type%20test_port_t%29%0A%28typeattributeset%20port_type%20test_port_t%29%0A%0A%3B%20Declare%20tcp%3A1440%20as%20test_port_t%0A%28portcon%20tcp%201440%20%28system_u%20object_r%20test_port_t%20%28%28s0%29%20%28s0%29%29%29%29
        filesystem: root
        mode: 0600
        path: /etc/selinux.d/testport.cil

This MachineConfig object tells the operator to put the policy in the specified path, with the specified permissions. Note that the policy is URL encoded due to what the ignition format requires.

Without this daemon, each policy installation would require us to persist the file on the node, then run a one-off systemd unit to install the policy. As policies get added to the system, the number of systemd units increases, which is neither scalable nor user-friendly.

Uses

This daemon is currently being used in the security-profiles-operator in order to do the heavy lifting of installing SELinux policies. The operator itself manages the policies as Kubernetes objects, and the daemon makes sure that they are actually installed in the nodes of the cluster.

Owner
Containers
Open Repository for Container Tools
Containers
Comments
  • Add a new semodule back end that forks out to policycoreutils to avoid memory leaks

    Add a new semodule back end that forks out to policycoreutils to avoid memory leaks

    During stress-testing of SPO it was found that selinuxd leaks memory. It appears that the leak is coming from libsemanage (confirmed with valgrind and fixed upstream). Using the policycoreutils back end, testing on OpenShift 4.x, the selinuxd containers spike at around ~400MB before falling back to ~30-50 MB. With the semanage back end, the memory would climb steadily until it would hit the 1GB limit imposed by SPO's DS definition and be OOMKilled.

    To work around that, this PR adds a new back-end for the semodule package that shells out to the policycoreutils utilities. This back end is the default on "RHEL-like" distributions, but otherwise selectable during build using the SEMODULE_BACKEND environment variable that translates into a build tag.

    The "Handler" interface was moved from semodule top-level to semodule/seiface to avoid circular dependencies.

  • build(deps): bump github.com/onsi/gomega from 1.22.1 to 1.24.0

    build(deps): bump github.com/onsi/gomega from 1.22.1 to 1.24.0

    Bumps github.com/onsi/gomega from 1.22.1 to 1.24.0.

    Release notes

    Sourced from github.com/onsi/gomega's releases.

    v1.24.0

    1.24.0

    Features

    Introducting gcustom - a convenient mechanism for building custom matchers.

    This is an RC release for gcustom. The external API may be tweaked in response to feedback however it is expected to remain mostly stable.

    Maintenance

    • Update BeComparableTo documentation [756eaa0]

    v1.23.0

    1.23.0

    Features

    • Custom formatting on a per-type basis can be provided using format.RegisterCustomFormatter() -- see the docs here

    • Substantial improvement have been made to StopTrying():

      • Users can now use StopTrying().Wrap(err) to wrap errors and StopTrying().Attach(description, object) to attach arbitrary objects to the StopTrying() error
      • StopTrying() is now always interpreted as a failure. If you are an early adopter of StopTrying() you may need to change your code as the prior version would match against the returned value even if StopTrying() was returned. Going forward the StopTrying() api should remain stable.
      • StopTrying() and StopTrying().Now() can both be used in matchers - not just polled functions.
    • TryAgainAfter(duration) is used like StopTrying() but instructs Eventually and Consistently that the poll should be tried again after the specified duration. This allows you to dynamically adjust the polling duration.

    • ctx can now be passed-in as the first argument to Eventually and Consistently.

    Maintenance

    • Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (#597) [afed901]
    • Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#599) [7c691b3]
    • Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#587) [ff22665]
    Changelog

    Sourced from github.com/onsi/gomega's changelog.

    1.24.0

    Features

    Introducting gcustom - a convenient mechanism for building custom matchers.

    This is an RC release for gcustom. The external API may be tweaked in response to feedback however it is expected to remain mostly stable.

    Maintenance

    • Update BeComparableTo documentation [756eaa0]

    1.23.0

    Features

    • Custom formatting on a per-type basis can be provided using format.RegisterCustomFormatter() -- see the docs here

    • Substantial improvement have been made to StopTrying():

      • Users can now use StopTrying().Wrap(err) to wrap errors and StopTrying().Attach(description, object) to attach arbitrary objects to the StopTrying() error
      • StopTrying() is now always interpreted as a failure. If you are an early adopter of StopTrying() you may need to change your code as the prior version would match against the returned value even if StopTrying() was returned. Going forward the StopTrying() api should remain stable.
      • StopTrying() and StopTrying().Now() can both be used in matchers - not just polled functions.
    • TryAgainAfter(duration) is used like StopTrying() but instructs Eventually and Consistently that the poll should be tried again after the specified duration. This allows you to dynamically adjust the polling duration.

    • ctx can now be passed-in as the first argument to Eventually and Consistently.

    Maintenance

    • Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (#597) [afed901]
    • Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#599) [7c691b3]
    • Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#587) [ff22665]
    Commits
    • ed1156b v1.24.0
    • 756eaa0 Update BeComparableTo documentation
    • 6015576 finish documenting gcustom
    • 0cfc53b godoc for gcustom
    • 6a2e51e First pass at gcustom: a convenience package for making custom matchers. Doc...
    • bf817a4 v1.23.0
    • 7b8b801 fix broken call to Eventually
    • ba35cc6 Allow ctx to be passed in as a leading parameter for Eventually and Consistently
    • 818b78c AsyncAssertions emit the format.Object representation of the error when it i...
    • d63d67e Rename AsyncSignalError to PollingSignalError
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • RIP CentOS

    RIP CentOS

    CentOS 8 went EOL by the end of 2021. Let's use Alma Linux instead while we're waiting for UBI to be actually useful.

    Signed-off-by: Jakub Hrozek [email protected]

  • build(deps): bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1

    build(deps): bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1

    Bumps github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1.

    Release notes

    Sourced from github.com/onsi/ginkgo/v2's releases.

    v2.5.1

    2.5.1

    Fixes

    • skipped tests only show as 'S' when running with -v [3ab38ae]
    • Fix typo in docs/index.md (#1082) [55fc58d]
    • Fix typo in docs/index.md (#1081) [8a14f1f]
    • Fix link notation in docs/index.md (#1080) [2669612]
    • Fix typo in --progress deprecation message (#1076) [b4b7edc]

    Maintenance

    • chore: Included githubactions in the dependabot config (#976) [baea341]
    • Bump golang.org/x/sys from 0.1.0 to 0.2.0 (#1075) [9646297]
    Changelog

    Sourced from github.com/onsi/ginkgo/v2's changelog.

    2.5.1

    Fixes

    • skipped tests only show as 'S' when running with -v [3ab38ae]
    • Fix typo in docs/index.md (#1082) [55fc58d]
    • Fix typo in docs/index.md (#1081) [8a14f1f]
    • Fix link notation in docs/index.md (#1080) [2669612]
    • Fix typo in --progress deprecation message (#1076) [b4b7edc]

    Maintenance

    • chore: Included githubactions in the dependabot config (#976) [baea341]
    • Bump golang.org/x/sys from 0.1.0 to 0.2.0 (#1075) [9646297]
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/onsi/ginkgo/v2 from 2.2.0 to 2.3.0

    build(deps): bump github.com/onsi/ginkgo/v2 from 2.2.0 to 2.3.0

    Bumps github.com/onsi/ginkgo/v2 from 2.2.0 to 2.3.0.

    Release notes

    Sourced from github.com/onsi/ginkgo/v2's releases.

    v2.3.0

    2.3.0

    Interruptible Nodes and Timeouts

    Ginkgo now supports per-node and per-spec timeouts on interruptible nodes. Check out the documentation for all the details but the gist is you can now write specs like this:

    It("is interruptible", func(ctx SpecContext) { // or context.Context instead of SpecContext, both are valid.
        // do things until `ctx.Done()` is closed, for example:
        req, err := http.NewRequestWithContext(ctx, "POST", "/build-widgets", nil)
        Expect(err).NotTo(HaveOccured())
        _, err := http.DefaultClient.Do(req)
        Expect(err).NotTo(HaveOccured())
    
    Eventually(client.WidgetCount).WithContext(ctx).Should(Equal(17))
    

    }, NodeTimeout(time.Second20), GracePeriod(5time.Second))

    and have Ginkgo ensure that the node completes before the timeout elapses. If it does elapse, or if an external interrupt is received (e.g. ^C) then Ginkgo will cancel the context and wait for the Grace Period for the node to exit before proceeding with any cleanup nodes associated with the spec. The ctx provided by Ginkgo can also be passed down to Gomega's Eventually to have all assertions within the node governed by a single deadline.

    Features

    • Ginkgo now records any additional failures that occur during the cleanup of a failed spec. In prior versions this information was quietly discarded, but the introduction of a more rigorous approach to timeouts and interruptions allows Ginkgo to better track subsequent failures.
    • SpecContext also provides a mechanism for third-party libraries to provide additional information when a Progress Report is generated. Gomega uses this to provide the current state of an Eventually().WithContext() assertion when a Progress Report is requested.
    • DescribeTable now exits with an error if it is not passed any Entries [a4c9865]

    Fixes

    • fixes crashes on newer Ruby 3 installations by upgrading github-pages gem dependency [92c88d5]
    • Make the outline command able to use the DSL import [1be2427]

    Maintenance

    • chore(docs): delete no meaning d [57c373c]
    • chore(docs): Fix hyperlinks [30526d5]
    • chore(docs): fix code blocks without language settings [cf611c4]
    • fix intra-doc link [b541bcb]
    Changelog

    Sourced from github.com/onsi/ginkgo/v2's changelog.

    2.3.0

    Interruptible Nodes and Timeouts

    Ginkgo now supports per-node and per-spec timeouts on interruptible nodes. Check out the documentation for all the details but the gist is you can now write specs like this:

    It("is interruptible", func(ctx SpecContext) { // or context.Context instead of SpecContext, both are valid.
        // do things until `ctx.Done()` is closed, for example:
        req, err := http.NewRequestWithContext(ctx, "POST", "/build-widgets", nil)
        Expect(err).NotTo(HaveOccured())
        _, err := http.DefaultClient.Do(req)
        Expect(err).NotTo(HaveOccured())
    
    Eventually(client.WidgetCount).WithContext(ctx).Should(Equal(17))
    

    }, NodeTimeout(time.Second20), GracePeriod(5time.Second))

    and have Ginkgo ensure that the node completes before the timeout elapses. If it does elapse, or if an external interrupt is received (e.g. ^C) then Ginkgo will cancel the context and wait for the Grace Period for the node to exit before proceeding with any cleanup nodes associated with the spec. The ctx provided by Ginkgo can also be passed down to Gomega's Eventually to have all assertions within the node governed by a single deadline.

    Features

    • Ginkgo now records any additional failures that occur during the cleanup of a failed spec. In prior versions this information was quietly discarded, but the introduction of a more rigorous approach to timeouts and interruptions allows Ginkgo to better track subsequent failures.
    • SpecContext also provides a mechanism for third-party libraries to provide additional information when a Progress Report is generated. Gomega uses this to provide the current state of an Eventually().WithContext() assertion when a Progress Report is requested.
    • DescribeTable now exits with an error if it is not passed any Entries [a4c9865]

    Fixes

    • fixes crashes on newer Ruby 3 installations by upgrading github-pages gem dependency [92c88d5]
    • Make the outline command able to use the DSL import [1be2427]

    Maintenance

    • chore(docs): delete no meaning d [57c373c]
    • chore(docs): Fix hyperlinks [30526d5]
    • chore(docs): fix code blocks without language settings [cf611c4]
    • fix intra-doc link [b541bcb]
    Commits
    • 87fc2ec v2.3.0
    • bda6ffe clarify what we mean by cleanup nodes
    • b182b1f document how SpecContext and Eventually work together
    • 5ddc567 be more consistent about 'Timedout' vs 'Timeout'
    • a87ec82 Gingko now records additional failures that occur during cleanup of a failed ...
    • cd395fc ensure post-timeout failure makes it into the JUnit report
    • b541bcb fix intra-doc link
    • 3512013 Specs that timeout now include information about any failures that occur afte...
    • ebf4bca Additional ProgressReport reporters can be attached to SpecContext
    • 6ee15dc bump gomega and validate integration with Gomega with SpecContext
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Bump go.uber.org/zap from 1.21.0 to 1.22.0

    Bump go.uber.org/zap from 1.21.0 to 1.22.0

    Bumps go.uber.org/zap from 1.21.0 to 1.22.0.

    Release notes

    Sourced from go.uber.org/zap's releases.

    v1.22.0

    Enhancements:

    • #1071[]: Add zap.Objects and zap.ObjectValues field constructors to log arrays of objects. With these two constructors, you don't need to implement zapcore.ArrayMarshaler for use with zap.Array if those objects implement zapcore.ObjectMarshaler.
    • #1079[]: Add SugaredLogger.WithOptions to build a copy of an existing SugaredLogger with the provided options applied.
    • #1080[]: Add *ln variants to SugaredLogger for each log level. These functions provide a string joining behavior similar to fmt.Println.
    • #1088[]: Add zap.WithFatalHook option to control the behavior of the logger for Fatal-level log entries. This defaults to exiting the program.
    • #1108[]: Add a zap.Must function that you can use with NewProduction or NewDevelopment to panic if the system was unable to build the logger.
    • #1118[]: Add a Logger.Log method that allows specifying the log level for a statement dynamically.

    Thanks to @​cardil, @​craigpastro, @​sashamelentyev, @​shota3506, and @​zhupeijun for their contributions to this release.

    #1071: uber-go/zap#1071 #1079: uber-go/zap#1079 #1080: uber-go/zap#1080 #1088: uber-go/zap#1088 #1108: uber-go/zap#1108 #1118: uber-go/zap#1118

    Changelog

    Sourced from go.uber.org/zap's changelog.

    1.22.0 (8 Aug 2022)

    Enhancements:

    • #1071[]: Add zap.Objects and zap.ObjectValues field constructors to log arrays of objects. With these two constructors, you don't need to implement zapcore.ArrayMarshaler for use with zap.Array if those objects implement zapcore.ObjectMarshaler.
    • #1079[]: Add SugaredLogger.WithOptions to build a copy of an existing SugaredLogger with the provided options applied.
    • #1080[]: Add *ln variants to SugaredLogger for each log level. These functions provide a string joining behavior similar to fmt.Println.
    • #1088[]: Add zap.WithFatalHook option to control the behavior of the logger for Fatal-level log entries. This defaults to exiting the program.
    • #1108[]: Add a zap.Must function that you can use with NewProduction or NewDevelopment to panic if the system was unable to build the logger.
    • #1118[]: Add a Logger.Log method that allows specifying the log level for a statement dynamically.

    Thanks to @​cardil, @​craigpastro, @​sashamelentyev, @​shota3506, and @​zhupeijun for their contributions to this release.

    #1071: uber-go/zap#1071 #1079: uber-go/zap#1079 #1080: uber-go/zap#1080 #1088: uber-go/zap#1088 #1108: uber-go/zap#1108 #1118: uber-go/zap#1118

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Print deamon info on startup

    Print deamon info on startup

    Sets the tag from the latest tag as a string during build and prints that version along with other information during the daemon and oneshot commands so that operator using selinuxd as an operand can know what exact selinuxd version was being used.

    Signed-off-by: Jakub Hrozek [email protected]

  • Filter out invalid module extensions

    Filter out invalid module extensions

    At the moment, SELinux userspace supports only PP and CIL modules so there's no need to try to install anything else then .cil or .pp files.

    Signed-off-by: Petr Lautrbach [email protected]

  • Bump github.com/onsi/gomega from 1.18.0 to 1.18.1

    Bump github.com/onsi/gomega from 1.18.0 to 1.18.1

    Bumps github.com/onsi/gomega from 1.18.0 to 1.18.1.

    Release notes

    Sourced from github.com/onsi/gomega's releases.

    v1.18.1

    • add pointer support to HaveField matcher (#495) [79e41a3]
    Changelog

    Sourced from github.com/onsi/gomega's changelog.

    1.18.1

    Fixes

    • Add pointer support to HaveField matcher (#495) [79e41a3]
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump github.com/onsi/gomega from 1.24.1 to 1.24.2

    build(deps): bump github.com/onsi/gomega from 1.24.1 to 1.24.2

    Bumps github.com/onsi/gomega from 1.24.1 to 1.24.2.

    Release notes

    Sourced from github.com/onsi/gomega's releases.

    v1.24.2

    1.24.2

    Fixes

    • Correctly handle assertion failure panics for eventually/consistnetly "g Gomega"s in a goroutine [78f1660]
    • docs:Fix typo "you an" -> "you can" (#607) [3187c1f]
    • fixes issue #600 (#606) [808d192]

    Maintenance

    • Bump golang.org/x/net from 0.2.0 to 0.4.0 (#611) [6ebc0bf]
    • Bump nokogiri from 1.13.9 to 1.13.10 in /docs (#612) [258cfc8]
    • Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#609) [e6c3eb9]
    Changelog

    Sourced from github.com/onsi/gomega's changelog.

    1.24.2

    Fixes

    • Correctly handle assertion failure panics for eventually/consistnetly "g Gomega"s in a goroutine [78f1660]
    • docs:Fix typo "you an" -> "you can" (#607) [3187c1f]
    • fixes issue #600 (#606) [808d192]

    Maintenance

    • Bump golang.org/x/net from 0.2.0 to 0.4.0 (#611) [6ebc0bf]
    • Bump nokogiri from 1.13.9 to 1.13.10 in /docs (#612) [258cfc8]
    • Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#609) [e6c3eb9]
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • build(deps): bump go.uber.org/zap from 1.23.0 to 1.24.0

    build(deps): bump go.uber.org/zap from 1.23.0 to 1.24.0

    Bumps go.uber.org/zap from 1.23.0 to 1.24.0.

    Release notes

    Sourced from go.uber.org/zap's releases.

    v1.24.0

    Enhancements:

    • #1148[]: Add Level to both Logger and SugaredLogger that reports the current minimum enabled log level.
    • #1185[]: SugaredLogger turns errors to zap.Error automatically.

    Thanks to @​Abirdcfly, @​craigpastro, @​nnnkkk7, and @​sashamelentyev for their contributions to this release.

    #1148: uber-go/zap#1148 #1185: uber-go/zap#1185

    Changelog

    Sourced from go.uber.org/zap's changelog.

    1.24.0 (30 Nov 2022)

    Enhancements:

    • #1148[]: Add Level to both Logger and SugaredLogger that reports the current minimum enabled log level.
    • #1185[]: SugaredLogger turns errors to zap.Error automatically.

    Thanks to @​Abirdcfly, @​craigpastro, @​nnnkkk7, and @​sashamelentyev for their contributions to this release.

    #1148: https://github.coml/uber-go/zap/pull/1148 #1185: https://github.coml/uber-go/zap/pull/1185

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • Use `semodule -lfull --checksum` instead of the datastore

    Use `semodule -lfull --checksum` instead of the datastore

    SELinux userspace release 3.4 introduced a new command line option [-m|--checksum] to semodule which adds sha256 checksum of modules to its output. It can be used to check whether the same module is already installed or not. Given that selinuxd installed modules use priority 350 we can use semodule checksum and priority 350 as an indicator whether a module was already installed by selinuxd or not and therefore there's no need to track the state of modules in a separate datastore.

    semodule --checksum is supported since Red Hat Enterprise Linux 8.6

    Signed-off-by: Petr Lautrbach [email protected]

  • policy-installer reports succes even when the installation of a module fails

    policy-installer reports succes even when the installation of a module fails

    {"level":"error","ts":1652443238.6348724,"caller":"policycoreutils/policycoreutils.go:41","msg":"Installing policy","modulePath":"/etc/selinux.d/wrongmodule.cil","output":"Re-declaration of typealias auditadm_ssh_tmpfs_t\nPrevious declaration of typealias at /var/lib/selinux/targeted/tmp/modules/350/wrongmodule/cil:1\nBad typealias declaration at /var/lib/selinux/targeted/tmp/modules/350/wrongmodule/cil:1\nFailed to build AST\n/usr/sbin/semodule:  Failed!\n","stacktrace":"github.com/containers/selinuxd/pkg/semodule/policycoreutils.(*SEModulePcuHandler).Install\n\t/home/plautrba/devel/src/selinuxd/pkg/semodule/policycoreutils/policycoreutils.go:41\ngithub.com/containers/selinuxd/pkg/daemon.(*policyInstall).do\n\t/home/plautrba/devel/src/selinuxd/pkg/daemon/action.go:52\ngithub.com/containers/selinuxd/pkg/daemon.InstallPolicies\n\t/home/plautrba/devel/src/selinuxd/pkg/daemon/daemon.go:124"}
    {"level":"error","ts":1652443238.6350026,"logger":"policy-installer","caller":"daemon/daemon.go:125","msg":"Failed applying operation on policy","operation":"install - /etc/selinux.d/wrongmodule.cil","output":"","error":"failed executing install action: cannot install module: /etc/selinux.d/wrongmodule.cil","stacktrace":"github.com/containers/selinuxd/pkg/daemon.InstallPolicies\n\t/home/plautrba/devel/src/selinuxd/pkg/daemon/daemon.go:125"}
    {"level":"info","ts":1652443238.6355646,"logger":"policy-installer","caller":"daemon/daemon.go:131","msg":"The operation was successful","operation":"install - /etc/selinux.d/wrongmodule.cil"}
    
    
  • RFC: use semodule --checksum and priorities instead of datastore

    RFC: use semodule --checksum and priorities instead of datastore

    I probably miss some piece of the puzzle but it looks like all datastore functionality could be implemented using semodule utility or libsemanage library. Bellow are shell snippets describing how it could work.

    • List() semodule -lfull | grep -E '^350

    • Put() is not necessagy, it's automatically covered by semodule -i ...

    • Get()

    # semodule -lfull --checksum | grep -E '^350 ' | grep $policy
    350 testpolicy           cil           sha256:0d682da9f705d4a44bad5151c59598f96a1839e10efe5f00b2bd16ba3c562676 
    

    This works on Fedora 36, RHEL-8.6, and RHEL9 and later

    • Remove() - automatically covered by semodule -r ...
  • Add Makefile targets to create stable releases, add version.go and print version

    Add Makefile targets to create stable releases, add version.go and print version

    • Print deamon info on startup

    Adds a VERSION file with the current daemon version, sets the NVR from that file as a string during build and prints that version along with other information during the daemon and oneshot commands so that operator using selinuxd as an operand can know what exact selinuxd version was being used.

    • Add release Makefile targets

    Adds several Makefile targets to help create stable releases. The top-level one is "make releas" which should be called with a RELEASE_VERSION variable, e.g.:

    make release RELEASE_VERSION=0.3.0
    

    Doing that changes the VERSION file, commits and tags that commit with the release version. Then, images using both Fedora and CentOS are built using that version as the tag instead of latest and pushed, finally the same images are built and pushed also using :latest.

Check the report history of any IP address to see if anyone else has reported malicious activities using API

abuseip Check the report history of any IP address to see if anyone else has reported malicious activities using API by abuseipdb.com. Installation $

Nov 13, 2021
E-commerce-project - RESTFUL API for TakTuku an E-Commerce App created for the purpose of study

About The Project RESTFUL API for TakTuku an E-Commerce App created for the purp

Jul 23, 2022
Super lightweight, easy-to-develop, general purpose golang framework

Super lightweight, easy-to-develop, general purpose golang framework ??

Jun 14, 2022
A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working directory easy, even for fairly large files.

httpfolder A quick and easy password protected web server for your files. httpfolder makes downloading/uploading files from your current working direc

Sep 12, 2022
Generates a simple skeleton directory structure for go/gin/bootstrap web apps

Gin Bootstrap Initializer Generates a simple skeleton directory structure for go/gin/bootstrap web apps Description This package handles building a co

Jan 21, 2022
A job queue and scheduler written in Go, backed by Postgres, and available over HTTP
A job queue and scheduler written in Go, backed by Postgres, and available over HTTP

Rickover This holds the code for a scheduler and a job queue written in Go and backed by Postgres. The goals/features of this project are: Visibility

Dec 31, 2022
Self-hosted video-hosting website and video archival manager for Niconico, Bilibili, and Youtube
Self-hosted video-hosting website and video archival manager for Niconico, Bilibili, and Youtube

Self-hosted video-hosting website and video archival manager for Niconico, Bilibili, and Youtube

Jan 1, 2023
Oct 1, 2021
A web forum built in Golang and SQLite and designed in SCSS
A web forum built in Golang and SQLite and designed in SCSS

Forum "Fairfax" ?? What is it? A web forum built in Golang and SQLite and designed in SCSS. Members of the forum can take a personality test and be so

Nov 10, 2021
A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.
A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

A Golang REST API to handle users and posts for a simple instagram backend. Uses MongoDB as the database. Tested using golang-testing and Postman.

Oct 10, 2021
GinGoExample - Implement rest api using gin and go and mongodb

GinGoExample Implement rest api using gin and go and mongodb Optimizations using Singlton pattern to avoid repetetive commiunication with mongodb . Fe

Mar 25, 2022
One-stop shop for english-translated licensed hentai manga and doujins, beat your meat in peace, without any bullshit and drama attached to it.

koushoku Source code of site [redacted] for those who are willing to run their own instance. How it serve and index the archives Archives and its file

Jan 2, 2023
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin
Automated penetration and auxiliary systems, providing XSS, XXE, DNS log, SSRF, RCE, web netcat and other Servers,gin-vue-admin

Simple DNS log Server,easy to ACME DNS challenge log easy send to elasticsearch https://github.com/hktalent/DNS_Server go4Hacker Automated penetration

Dec 30, 2022
Polite, slim and concurrent web crawler.

gocrawl gocrawl is a polite, slim and concurrent web crawler written in Go. For a simpler yet more flexible web crawler written in a more idiomatic Go

Dec 31, 2022
[爬虫框架 (golang)] An awesome Go concurrent Crawler(spider) framework. The crawler is flexible and modular. It can be expanded to an Individualized crawler easily or you can use the default crawl components only.

go_spider A crawler of vertical communities achieved by GOLANG. Latest stable Release: Version 1.2 (Sep 23, 2014). QQ群号:337344607 Features Concurrent

Dec 30, 2022
A URL shortener using http://is.gd/ and the Go programming language (http://golang.org/)

goisgd A simple command line URL shortener using http://is.gd/. Getting the Code go get github.com/NickPresta/GoURLShortener Usage Import this librar

Apr 6, 2022
:construction: Closed. A website and user system (Gin/Backbone).

A website and user system starter. Implemented with gin and Backbone. Gowall is port of Drywall Go Node.js Repository here Drywall Site Gowall Drywall

Jul 6, 2020
a url shortener made using go and redis

__ | |--.--.--.----.-----. .-----.-----. | <| | | _|-- __|__| _ | _ | |__|__|_____|__| |_____|__|___

Dec 10, 2020
Extensible wiki system using CouchDB and written in Golang
Extensible wiki system using CouchDB and written in Golang

Wikifeat Introduction Wikifeat is an open source collaboration platform built around the ever-popular Wiki concept. It is meant to be extensible and h

Aug 23, 2022