Skip to content

Commit

Permalink
docs: add license headers and spdx id
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
  • Loading branch information
leogr authored and poiana committed Oct 12, 2023
1 parent 4ae897b commit 790d97b
Show file tree
Hide file tree
Showing 45 changed files with 707 additions and 55 deletions.
14 changes: 14 additions & 0 deletions cmd/build/build_configs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package build

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/cleanup/cleanup_configs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cleanup

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/cleanup/cleanup_drivers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cleanup

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/configs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/drivers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/generate/generate_configs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package generate

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/publish/publish_drivers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package publish

import (
Expand Down
23 changes: 19 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd

import (
"fmt"
"github.com/falcosecurity/dbg-go/pkg/root"
"github.com/falcosecurity/driverkit/pkg/kernelrelease"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"log"
"log/slog"
"os"
"runtime"
"strings"

"github.com/falcosecurity/dbg-go/pkg/root"
"github.com/falcosecurity/driverkit/pkg/kernelrelease"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

var (
Expand Down
14 changes: 14 additions & 0 deletions cmd/stats/stats_configs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package stats

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/stats/stats_drivers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package stats

import (
Expand Down
14 changes: 14 additions & 0 deletions cmd/validate/validate_configs.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package validate

import (
Expand Down
17 changes: 16 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package main

import (
"github.com/falcosecurity/dbg-go/cmd"
"log/slog"

"github.com/falcosecurity/dbg-go/cmd"
)

func main() {
Expand Down
23 changes: 19 additions & 4 deletions pkg/build/build.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package build

import (
"fmt"
"log/slog"
"os"
"path/filepath"
"sync"

"github.com/falcosecurity/dbg-go/pkg/root"
s3utils "github.com/falcosecurity/dbg-go/pkg/utils/s3"
"github.com/falcosecurity/dbg-go/pkg/validate"
"github.com/falcosecurity/driverkit/cmd"
"github.com/falcosecurity/driverkit/pkg/driverbuilder"
"github.com/pkg/errors"
"gopkg.in/yaml.v3"
"log/slog"
"os"
"path/filepath"
"sync"
)

// Used by tests
Expand Down
25 changes: 20 additions & 5 deletions pkg/build/build_test.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,34 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package build

import (
"context"
"os"
"path/filepath"
"runtime"
"testing"
"time"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/falcosecurity/dbg-go/pkg/generate"
"github.com/falcosecurity/dbg-go/pkg/root"
s3utils "github.com/falcosecurity/dbg-go/pkg/utils/s3"
testutils "github.com/falcosecurity/dbg-go/pkg/utils/test"
"github.com/stretchr/testify/assert"
"os"
"path/filepath"
"runtime"
"testing"
"time"
)

// NOTE: this test might be flaking because it tries to build some configs against a driver version.
Expand Down
14 changes: 14 additions & 0 deletions pkg/build/types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package build

import (
Expand Down
17 changes: 16 additions & 1 deletion pkg/cleanup/cleaner_file.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cleanup

import (
"github.com/falcosecurity/dbg-go/pkg/root"
"os"

"github.com/falcosecurity/dbg-go/pkg/root"
)

type fileCleaner struct {
Expand Down
15 changes: 15 additions & 0 deletions pkg/cleanup/cleaner_s3.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright (C) 2023 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cleanup

import (
"context"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
s3utils "github.com/falcosecurity/dbg-go/pkg/utils/s3"
Expand Down
Loading

0 comments on commit 790d97b

Please sign in to comment.