-
Notifications
You must be signed in to change notification settings - Fork 6
feat(edr): stabilize agent orchestration, complete event ingestion pipeline, and optimize dev tooling #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ea75cf2
Refactor Kafka Pipeline and Agent Integration
swar09 121a806
feat: update dependencies and enhance agent functionality with new mo…
swar09 1bc7e76
feat: enhance CI/CD pipeline with additional dependencies and improve…
swar09 860b1bf
cargo fmt
swar09 f25e67e
feat: enhance OS version retrieval with detailed parsing from /etc/os…
swar09 f0beaab
feat: implement OS version retrieval from /etc/os-release and update …
swar09 7a2fc70
feat: update AgentCore and FleetClient to improve command handling an…
swar09 5447a85
feat: implement heartbeat functionality and enhance enrollment proces…
swar09 2138124
feat: refactor enrollment and command handling to use new RegisterReq…
swar09 b3c37df
feat(agent): update logging level to debug and set node_id
swar09 965e6fd
feat: enhance preflight checks and default configurations
swar09 03ab5b2
fix: correct comments in osquery EDR guide and update typos configura…
swar09 c52383e
fix: improve formatting in preflight and test_query files
swar09 63d75be
Revise README with project details and setup instructions
swar09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # ============================================================================= | ||
| # EDR Local Development Environment Template (.dev.env) | ||
| # Usage: | ||
| # cp .dev.env.example .env | ||
| # # Adjust values below if you have a custom setup | ||
| # ============================================================================= | ||
|
|
||
| # ── Fleet Server Settings ────────────────────────────────────────────────────── | ||
| # Host/Port the gRPC service will listen on (0.0.0.0 to bind on all interfaces) | ||
| HOST=0.0.0.0 | ||
| PORT=50051 | ||
|
|
||
| # Secret key used to sign and verify node authorization JWT tokens. | ||
| # Change this in staging/production! | ||
| JWT_SECRET=dev-jwt-secret-key-do-not-use-in-production-12345 | ||
|
|
||
| # Logging configuration for fleet-server | ||
| RUST_LOG=debug | ||
| LOG_FORMAT=human | ||
|
|
||
| # ── Database Connections ───────────────────────────────────────────────────── | ||
| # PostgreSQL instance for fleet node registrations (managed by infra/docker-compose.yml) | ||
| # Default port is 5433 for nodes DB | ||
| DATABASE_URL=postgres://edr:changeme@127.0.0.1:5433/edr_nodes | ||
|
|
||
| # ── Kafka Configuration ────────────────────────────────────────────────────── | ||
| # Kafka brokers list (using 127.0.0.1 explicitly to bypass IPv6 resolution delays/bugs on local Docker setups) | ||
| KAFKA_BROKERS=127.0.0.1:9092 | ||
|
|
||
| # Raw telemetry ingestion topic | ||
| KAFKA_TOPIC_AGENTS_EVENTS=edr.events.raw | ||
|
|
||
| # Note: The Kafka Web UI is accessible in your browser at http://localhost:8090 | ||
|
|
||
| # ── Agent Settings ─────────────────────────────────────────────────────────── | ||
| # Config path override for running the EDR agent locally without sudo installation. | ||
| # By setting this, 'cargo run --bin edr-agent' will load this config file automatically. | ||
| EDR_AGENT_CONFIG=agent/agent.toml | ||
|
|
||
| # Logging configuration for the agent | ||
| AGENT_RUST_LOG=debug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| target/ | ||
| .git/ | ||
| .github/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # EDR Workspace Environment Variables Template | ||
| # Copy this file to .env at the workspace root and adjust as necessary for your local setup. | ||
|
|
||
| # Fleet Server Database Connection | ||
| # Format: postgres://<user>:<password>@<host>:<port>/<database> | ||
| DATABASE_URL=postgres://edr:changeme@localhost:5433/edr_nodes | ||
|
|
||
| # Kafka Brokers configuration (using 127.0.0.1 to avoid IPv6 localhost resolution bugs on host) | ||
| KAFKA_BROKERS=127.0.0.1:9092 | ||
| KAFKA_TOPIC_AGENTS_EVENTS=edr.events.raw | ||
|
|
||
| # Auth JWT Secret (Replace with a real 256-bit secret in production) | ||
| JWT_SECRET=change-me-in-production | ||
|
|
||
| # Server bind host and port | ||
| HOST=0.0.0.0 | ||
| PORT=50051 | ||
|
|
||
| # Logging level and output format (human | json) | ||
| RUST_LOG=info | ||
| LOG_FORMAT=human | ||
|
|
||
| # EDR Agent configuration path (optional, overrides default /etc/aigis-zero/config.toml) | ||
| # EDR_AGENT_CONFIG=agent/agent.toml | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Kafka Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'kafka-pipeline/**' | ||
| - 'sdk/**' | ||
| pull_request: | ||
| paths: | ||
| - 'kafka-pipeline/**' | ||
| - 'sdk/**' | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libcurl4-openssl-dev pkg-config | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - run: cargo check --manifest-path kafka-pipeline/Cargo.toml | ||
| - run: cargo clippy --manifest-path kafka-pipeline/Cargo.toml -- -D warnings | ||
| - run: cargo fmt --manifest-path kafka-pipeline/Cargo.toml -- --check | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| kafka: | ||
| image: apache/kafka:latest | ||
| env: | ||
| KAFKA_NODE_ID: 1 | ||
| KAFKA_PROCESS_ROLES: broker,controller | ||
| KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093 | ||
| KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,CONTROLLER://kafka:9093 | ||
| KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER | ||
| KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093 | ||
| CLUSTER_ID: MkQkQzE4NTJjYTEyODQ4MTcwMw | ||
| ports: | ||
| - 9092:9092 | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libcurl4-openssl-dev pkg-config | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - run: cargo test --manifest-path kafka-pipeline/Cargo.toml | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler libcurl4-openssl-dev pkg-config | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - run: cargo build --release --manifest-path kafka-pipeline/Cargo.toml | ||
|
|
||
| docker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - run: docker build -t aigis-kafka-pipeline -f kafka-pipeline/Dockerfile . | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,4 +52,7 @@ dist-ssr/ | |
| *.sw? | ||
|
|
||
| */frontendprompt.md | ||
| .agent/* | ||
| .agent/* | ||
| dev-testing-skill.md | ||
| agent-analysis.md | ||
| TEST_GUIDE.md | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update actions/checkout to v4.
Lines 17, 40, 48, and 56 use
actions/checkout@v3, but the v3 runner is deprecated and no longer supported on GitHub Actions. Update to@v4to ensure compatibility with current GitHub infrastructure.🔧 Proposed fix
Apply this change to all four jobs (check, test, build, docker).
Also applies to: 40-40, 48-48, 56-56
🧰 Tools
🪛 actionlint (1.7.12)
[error] 17-17: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 zizmor (1.25.2)
[warning] 17-17: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools