Commit graph

67 commits

Author SHA1 Message Date
dependabot[bot]
615b3eb5a4
Bump actions/dependency-review-action from 4.2.3 to 4.2.4
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.2.3 to 4.2.4.
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](0fa40c3c10...733dd5d4a5)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 08:19:50 +00:00
71a6f505e1
Merge pull request #10 from wneessen/update-SECURITY-md
Update project names in SECURITY.md
2024-03-21 20:27:12 +01:00
eab102f166
Update project names in SECURITY.md
Project names in the SECURITY.md file have been updated to reflect the correct projects: js-mailer to logranger. The email and URL for reporting security issues have been revised accordingly.
2024-03-21 20:26:20 +01:00
166878714d
Merge pull request #9 from wneessen/readability
Refactor variable names for improved code readability
2024-03-21 20:24:23 +01:00
80e30c6bda
Refactor variable names for improved code readability
The changes involved refactor and clean-up of variable names. This encompasses making the names more descriptive and meaningful to enhance the readability of the code. Accuracy of variable names in conveying their usage and purpose has been greatly improved. The changes span across multiple files, touching crucial components like the server, rulesets, connection, and configuration handling.
2024-03-21 20:22:33 +01:00
c86532d5d9
Merge pull request #8 from wneessen/fix_reuse
Add SPDX license headers to workflows and Dependabot config
2024-03-21 16:35:44 +01:00
f0e0b94307
Add SPDX license headers to workflows and Dependabot config
Added SPDX license headers to the GitHub workflows and the Dependabot configuration file, specifying the license as MIT. Also, minor formatting changes have been made to the dependency review workflow file.
2024-03-21 16:35:03 +01:00
7b6edf1c31
Merge pull request #3 from wneessen/dependabot/github_actions/actions/checkout-4.1.2
Bump actions/checkout from 2.7.0 to 4.1.2
2024-03-21 16:33:27 +01:00
dependabot[bot]
9a7db0fb90
Bump actions/checkout from 2.7.0 to 4.1.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.7.0 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.7.0...9bb56186c3b09b4f86b1c65136769dd318469633)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 15:33:13 +00:00
fc1ca00262
Merge pull request #4 from wneessen/dependabot/github_actions/github/codeql-action-3.24.8
Bump github/codeql-action from 2.24.8 to 3.24.8
2024-03-21 16:33:08 +01:00
f54f539549
Merge pull request #5 from wneessen/dependabot/github_actions/actions/setup-go-5.0.0
Bump actions/setup-go from 3.5.0 to 5.0.0
2024-03-21 16:32:47 +01:00
0fb013853b
Merge pull request #6 from wneessen/dependabot/github_actions/fsfe/reuse-action-3.0.0
Bump fsfe/reuse-action from 1.3.0 to 3.0.0
2024-03-21 16:32:37 +01:00
77c67b4aeb
Merge pull request #7 from wneessen/dependabot/github_actions/golangci/golangci-lint-action-4.0.0
Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0
2024-03-21 16:32:26 +01:00
dependabot[bot]
3f4a9c23cc
Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.7.0 to 4.0.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](3a91952989...3cfe3a4abb)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 15:31:34 +00:00
dependabot[bot]
4967c82d92
Bump fsfe/reuse-action from 1.3.0 to 3.0.0
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 1.3.0 to 3.0.0.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](28cf8f33bc...a46482ca36)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 15:31:31 +00:00
dependabot[bot]
08a58e25ad
Bump actions/setup-go from 3.5.0 to 5.0.0
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3.5.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](6edd4406fa...0c52d547c9)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 15:31:29 +00:00
dependabot[bot]
8d6a02c386
Bump github/codeql-action from 2.24.8 to 3.24.8
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.24.8 to 3.24.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.24.8...05963f47d870e2cb19a537396c1f668a348c7d8f)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-21 15:31:25 +00:00
4ab61a625e
Merge pull request #2 from step-security-bot/stepsecurity_remediation_1711034495
[StepSecurity] Apply security best practices
2024-03-21 16:30:56 +01:00
StepSecurity Bot
5897a4ece0
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-03-21 15:21:39 +00:00
94bc56f032
Merge pull request #1 from wneessen/fix_workflows
Implement security improvements and workflow updates
2024-03-21 16:15:21 +01:00
5c41bef4dc
Remove CodeQL 2024-03-21 16:13:37 +01:00
df58859a4f
Update language matrix in codeql workflow
The language matrix in the .github/workflows/codeql.yml file has been updated to only include 'go'. This change removes the 'javascript-typescript' option to focus solely on Go code analysis and enhance the efficiency of the workflow process.
2024-03-21 16:10:38 +01:00
38661b29ae
Disable Autobuild and add new build commands in workflow
The Autobuild command in the .github/workflows/codeql.yml file has been commented out due to possible build failure. Instead, a new run command is added to manually build the application using Go. This change allows for more control and reliability on the build process.
2024-03-21 16:08:38 +01:00
ddc62a9a04
Add CC0-1.0 license and update workflow files
A new file, LICENSES/CC0-1.0.txt, has been created to provide the Creative Commons Zero v1.0 Universal license for the project. Additionally, SPDX headers specifying the MIT license and copyright details have been added to each of the GitHub workflow files, enhancing the clarity and compliance of the project's license utilization.
2024-03-21 16:02:13 +01:00
42e89bc2bb
Implement security improvements and workflow updates
Added SECURITY.md with details for vulnerability reporting and encryption. Introduced new workflows for dependency review, Scorecard supply-chain security, and CodeQL analysis. Made amendments to docker-publish.yml for better Docker build and publishing process. These enhancements are aimed towards improving the security stance and the efficiency of CI/CD workflows.
2024-03-21 15:47:46 +01:00
9ca1b16c03 Merge pull request 'Update project references to use GitHub repository' (#2) from forgejo_to_gh into main
Reviewed-on: #2
2024-03-21 15:40:31 +01:00
a50ae7299c
Update project references to use GitHub repository
All project references have been updated to point to the appropriate routes for the GitHub repository, replacing the previously used paths to src.neessen.cloud. This includes changes in README.md, Dockerfile, go mod packaging as well as in the source code where required.
2024-03-21 15:39:31 +01:00
e11e5954e3
Update Go version in .golangci.toml
The Go version in the .golangci.toml has been updated from 1.20 to 1.22. This update ensures that our project stays up-to-date with the latest stable version of Go, providing new features and improvements.
2024-02-08 16:16:03 +01:00
a20b6c64c6
Update module references in various files
Module references within 'go.mod', 'main.go', and various plugin files have been changed from 'github.com/wneessen/logranger' to 'src.neessen.cloud/wneessen/logranger'. This update is essential to align with the new source location and ensure code and plugins function as expected. The Dockerfile’s commands have also been updated accordingly.
2024-02-08 14:32:29 +01:00
79fbd4b7db
Update badge link references in README.md
The Hyperlinks for the GoDoc, Go Report Card, and REUSE status badges in README.md were updated to align with the new source location. This change ensures the badges direct to the correct and current repository, providing accurate and updated information.
2024-02-08 14:26:18 +01:00
b68f6a2b5b
Update copyright year and hyperlink references in README.md
The copyright year was updated to reflect changes in ownership duration and hyperlink references for badges were updated to match the new source location. This enhances accuracy and ensures that the links reflect the most current repository location.
2024-02-08 14:23:29 +01:00
d9a2f33194
Improve README.md formatting
The source information in the README.md has been revised for enhanced readability. The URL currently served as a mirror for our Github repository has been shifted to a new line for better visibility and comprehension.
2024-02-08 14:16:56 +01:00
645522b11b Merge pull request 'Update README.md' (#1) from wneessen-patch-1 into main
Reviewed-on: #1
2024-02-08 14:12:35 +01:00
c32857b43b Update README.md
Add note about Github mirror
2024-02-08 14:12:13 +01:00
dd8d660571
Implemented ReloadConfig method in server
A new ReloadConfig function has been added to the Server in server.go which reloads server configurations and updates the Server's conf field as well as the configured Ruleset. Changes have also been made to the handling of the SIGHUP signal in main.go, using this new function to reload configurations and updating the logs accordingly.
2023-12-27 19:59:49 +01:00
fa527345a3
Add SPDX license headers to support-files
New SPDX license headers have been added to `group.license` and `passwd.license` found within the `support-files` directory. These headers show that the files are licensed under the MIT license and copyrighted by Winni Neessen.
2023-12-27 18:29:36 +01:00
f08e92fdd4
Create docker-publish.yml 2023-12-27 18:28:01 +01:00
a5c8e5962b
Add Dockerfile for project build
Introduced Dockerfile to manage the build process for the project, including its dependencies. This development will standardize the environment, thus making it easier for others to build and run the app. Also added necessary 'passwd' and 'group' files in 'support-files' directory for managing user details in Docker.
2023-12-27 18:25:55 +01:00
44473579de
Add badges to README for Logranger project
Appended project badges in the README file to provide quick project status checks and important links. These include badges for GoDoc, Go Report Card, Discord, REUSE status, and a Ko-fi donation button, fostering easy navigation and interaction for the project users and contributors.
2023-12-27 17:33:38 +01:00
97bfbbfddd
Update and enrich README for Logranger project
Expanded the README file to include a detailed description of Logranger project's purpose, features, available plugins and support. This provides a comprehensive overview of the project for new or prospective users and contributors, offering insights on its functionality, customization features, efficient log processing, and rule-based filtering capabilities.
2023-12-27 17:23:25 +01:00
dbe0c6fe3b
Process log messages asynchronously in server.go
Changed the processing of log messages to run in a separate go routine, improving the performance of the server. This update ensures efficient log processing by allowing multiple log messages to be processed concurrently. The function has also been refactored to not return an error as any issues should be contained within the routine call itself.
2023-12-27 17:07:25 +01:00
a26c565119
Improve log message processing and action execution in server.go
Added a new function to process log messages and match them against the ruleset. This function will also handle action execution when a match is found. Additionally, added error handling and a layer of fault tolerance within the action configuration process. As a result, if an error arises while configuring an action, the error is logged and skipped, allowing for the rest of the actions to execute.
2023-12-25 21:30:44 +01:00
9089cd80ca
Add error skip logic to action configuration
Updated the action configuration process in server.go to skip an action if its configuration results in an error. This ensures that the remaining actions can still execute, even if one fails during the configuration stage. File action plugin specifically has been updated to support this skip on error logic.
2023-12-25 21:08:54 +01:00
670e5b1d30
Refactor plugins.Action to separate configuration step
Refactored the Action interface in the plugins package to separate the configuration step from the process method. The new Config method accepts a configuration map and returns an error. The modified server.go uses this Config method to apply configurations before calling Process. File action plugin specifically has been updated to support this new interface where configurations are now updated via Config method before invoking Process.
2023-12-25 21:08:03 +01:00
68b1544125
Add SHA hashing and base64 encoding methods to template
Implemented new template functions to allow conversion of strings to SHA-1, SHA-256, and SHA-512 hash formats, as well as base64 encoding. These changes include the creation of the SHAAlgo type and associated constants representing different SHA algorithms. The additional functionality will enhance template handling by adding more options for string encryption and encoding.
2023-12-23 22:00:23 +01:00
b6f6b6a664
Implement Actions interface and update rule handling in Server
Introduced an Actions interface for plugins in 'action.go' and implemented a corresponding registry in 'registry.go'. Additionally, adjusted rule related behavior in 'Server' to account for actions, with relevant new fields in Ruleset and Rule. This enables multiple actions on a log message based on defined rules and further modularises the codebase, paving the path for addition of more plugin actions.
2023-12-23 20:29:38 +01:00
6987f4627c
Add HostMatch field and related functionality in Ruleset and Server
The Ruleset struct has been updated to include a 'HostMatch' field. A corresponding conditional block to handle 'HostMatch' was added in the 'Server' object's ruleset cycle. This allows the rules to include host-specific matches and debug information about matches found. Further expansion of this functionality can enable detailed rule application based on the target host.
2023-12-22 21:52:33 +01:00
1aaa9ac247
Remove unnecessary line break in server.go
An unnecessary line break in the server.go file was removed, which was situated between connection error handling and the read loop. Such spacing did not contribute to readability or function, hence impacting the overall code cleanliness.
2023-12-22 17:33:26 +01:00
0fae461408
Implement Ruleset configuration in logranger
Added a Ruleset configuration to the logranger application, along with associated error handling. The code now loads a ruleset file from configuration, checks for duplicate rules, and logs each rule as it is found. The ruleset is also integrated within the server setup. The PIDFile now includes a default RuleFile reference in config.go.
2023-12-22 17:31:41 +01:00
77ad132bc7
Add more pattern to .gitignore
The provided diff includes an extra pattern to the .gitignore list - 'etc/*.local.*.toml'. This was done to ensure that all variations of local configuration files are ignored by Git, preventing them from being unnecessarily tracked.
2023-12-22 17:31:28 +01:00