File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ //go:build linux
2
+ // +build linux
3
+
4
+ // SPDX-License-Identifier: Apache-2.0
5
+ /*
6
+ Copyright (C) 2023 The Falco Authors.
7
+ Licensed under the Apache License, Version 2.0 (the "License");
8
+ you may not use this file except in compliance with the License.
9
+ You may obtain a copy of the License at
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.
16
+ */
17
+
18
+ package syscall
19
+
20
+ import (
21
+ "github.com/falcosecurity/event-generator/events"
22
+
23
+ "os"
24
+ )
25
+
26
+ var _ = events .Register (
27
+ ReadSshInformation ,
28
+ events .WithDisabled (), // the rule is not enabled by default, so disable the action too
29
+ )
30
+
31
+ func ReadSshInformation (h events.Helper ) error {
32
+ const filename = "/root/.ssh/known_hosts"
33
+ h .Log ().Info ("attempting to simulate SSH information read" )
34
+ file , err := os .Open (filename )
35
+ defer file .Close ()
36
+ return err
37
+ }
You can’t perform that action at this time.
0 commit comments