Skip to content

Commit

Permalink
Update decoding_payload_in_container.go
Browse files Browse the repository at this point in the history
Signed-off-by: Kapil Sharma <[email protected]>
  • Loading branch information
h4l0gen authored and poiana committed Mar 28, 2024
1 parent 9c6f486 commit 2cc987e
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions events/syscall/decoding_payload_in_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,25 @@ limitations under the License.
package syscall

import (
"os/exec"

"github.com/falcosecurity/event-generator/events"
"os/exec"
"github.com/falcosecurity/event-generator/events"
)

var _ = events.Register(
DecodingPayloadInContainer,
events.WithDisabled(), // this rules is not included in falco_rules.yaml (stable rules), so disable the action
DecodingPayloadInContainer,
events.WithDisabled(), // this rule is not included in falco_rules.yaml (stable rules), so disable the action
)

func DecodingPayloadInContainer(h events.Helper) error {
if h.InContainer() {
cmd := exec.Command("base64", "-d")
}
return nil
if h.InContainer() {
encodedPayload := "ZGVjb2RlZF9ieV9ldmVudC1nZW5lcmF0b3I="
cmd := exec.Command("echo", encodedPayload, "|", "base64", "-d")

err := cmd.Run()
if err != nil {
return err
}
}

return nil
}

0 comments on commit 2cc987e

Please sign in to comment.