Skip to content

Commit 6deced9

Browse files
committed
Add integration tests for PostgreSQL, Redis, RabbitMQ, and Prometheus using TestContainers
- Implemented comprehensive integration tests for PostgreSQL, Redis, RabbitMQ, and Prometheus within the Nephoran Intent Operator. - Established a ContainerTestTracker to monitor container operations, cache operations, queue operations, and metrics collection. - Created performance testing scripts using k6 to evaluate intent processing under various load scenarios, including baseline, spike, and stress tests. - Defined custom metrics for tracking intent processing duration, success rates, error rates, and throughput. - Enhanced health check mechanisms and added detailed logging for intent creation and status checks. - Generated HTML and JSON reports for load test summaries, including key metrics and thresholds.
1 parent 0bfec16 commit 6deced9

37 files changed

Lines changed: 21558 additions & 437 deletions

.github/codeql/codeql-config.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# CodeQL configuration for Nephoran Intent Operator
2+
name: "Nephoran CodeQL Configuration"
3+
4+
# Disable default queries and use custom query suites
5+
disable-default-queries: false
6+
7+
# Query suites to run
8+
queries:
9+
- uses: security-and-quality
10+
- uses: security-experimental
11+
- name: Custom telecom queries
12+
uses: ./.github/codeql/queries/
13+
14+
# Paths to analyze
15+
paths:
16+
- pkg/
17+
- cmd/
18+
- api/
19+
20+
# Paths to ignore
21+
paths-ignore:
22+
- "**/*_test.go"
23+
- "**/vendor/**"
24+
- "**/testdata/**"
25+
- "bin/"
26+
- ".excellence-reports/"
27+
- "chaos-results/"
28+
29+
# Build configuration for Go
30+
build-mode: manual
31+
32+
# Language-specific configuration
33+
go:
34+
# Use Go build tags for conditional compilation
35+
build-tags:
36+
- "integration"
37+
- "security"
38+
# Include test files for analysis
39+
include-test-files: false
40+
41+
# Query filters
42+
query-filters:
43+
- exclude:
44+
id: go/hardcoded-credentials
45+
# Exclude test credentials and examples
46+
paths:
47+
- "**/examples/**"
48+
- "**/testutils/**"
49+
- "**/fixtures/**"
50+
51+
- exclude:
52+
id: go/clear-text-logging
53+
# Exclude logging in test files
54+
paths:
55+
- "**/*_test.go"
56+
57+
# Enable experimental features
58+
experimental: true

.github/dependabot.yml

Lines changed: 82 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,133 @@
1-
# Dependabot configuration for Nephoran Intent Operator
2-
# This configuration ensures dependencies are kept up-to-date and secure
3-
1+
# Dependabot configuration for automated dependency updates
42
version: 2
53
updates:
6-
# Go modules
4+
# Go modules dependencies
75
- package-ecosystem: "gomod"
86
directory: "/"
97
schedule:
108
interval: "weekly"
119
day: "monday"
12-
time: "04:00"
10+
time: "06:00"
11+
timezone: "UTC"
1312
open-pull-requests-limit: 10
1413
reviewers:
15-
- "security-team"
14+
- "thc1006"
1615
assignees:
17-
- "devops-team"
16+
- "thc1006"
1817
commit-message:
19-
prefix: "deps"
18+
prefix: "build(deps): "
2019
include: "scope"
2120
labels:
2221
- "dependencies"
23-
- "security"
24-
- "auto-merge"
25-
ignore:
26-
# Ignore major version updates for critical dependencies
27-
- dependency-name: "k8s.io/*"
28-
update-types: ["version-update:semver-major"]
29-
- dependency-name: "sigs.k8s.io/*"
30-
update-types: ["version-update:semver-major"]
22+
- "go"
23+
- "automated"
24+
# Security updates get higher priority
25+
groups:
26+
security-updates:
27+
patterns:
28+
- "*"
29+
update-types:
30+
- "security"
31+
# Group non-security updates by ecosystem
32+
groups:
33+
go-dependencies:
34+
patterns:
35+
- "*"
36+
exclude-patterns:
37+
- "k8s.io/*"
38+
- "sigs.k8s.io/*"
39+
update-types:
40+
- "minor"
41+
- "patch"
42+
kubernetes-dependencies:
43+
patterns:
44+
- "k8s.io/*"
45+
- "sigs.k8s.io/*"
46+
update-types:
47+
- "minor"
48+
- "patch"
3149

3250
# Docker dependencies
3351
- package-ecosystem: "docker"
3452
directory: "/"
3553
schedule:
3654
interval: "weekly"
37-
day: "monday"
38-
time: "04:30"
55+
day: "tuesday"
56+
time: "06:00"
57+
timezone: "UTC"
3958
open-pull-requests-limit: 5
4059
reviewers:
41-
- "security-team"
60+
- "thc1006"
4261
assignees:
43-
- "devops-team"
62+
- "thc1006"
4463
commit-message:
45-
prefix: "docker"
46-
include: "scope"
64+
prefix: "build(docker): "
4765
labels:
4866
- "dependencies"
4967
- "docker"
50-
- "security"
68+
- "automated"
5169

52-
# RAG Python dependencies
53-
- package-ecosystem: "pip"
54-
directory: "/rag-python"
70+
# GitHub Actions dependencies
71+
- package-ecosystem: "github-actions"
72+
directory: "/"
5573
schedule:
5674
interval: "weekly"
57-
day: "monday"
58-
time: "05:00"
59-
open-pull-requests-limit: 10
75+
day: "wednesday"
76+
time: "06:00"
77+
timezone: "UTC"
78+
open-pull-requests-limit: 5
6079
reviewers:
61-
- "security-team"
80+
- "thc1006"
6281
assignees:
63-
- "ai-team"
82+
- "thc1006"
6483
commit-message:
65-
prefix: "python-deps"
66-
include: "scope"
84+
prefix: "ci: "
6785
labels:
6886
- "dependencies"
69-
- "python"
70-
- "rag-api"
71-
- "security"
87+
- "github-actions"
88+
- "ci-cd"
89+
- "automated"
7290

73-
# GitHub Actions
74-
- package-ecosystem: "github-actions"
75-
directory: "/"
91+
# Helm dependencies
92+
- package-ecosystem: "bundler"
93+
directory: "/deployments/helm"
7694
schedule:
77-
interval: "weekly"
78-
day: "monday"
79-
time: "05:30"
80-
open-pull-requests-limit: 5
95+
interval: "monthly"
96+
day: 15
97+
time: "06:00"
98+
timezone: "UTC"
99+
open-pull-requests-limit: 3
81100
reviewers:
82-
- "devops-team"
101+
- "thc1006"
83102
assignees:
84-
- "devops-team"
103+
- "thc1006"
85104
commit-message:
86-
prefix: "ci"
87-
include: "scope"
105+
prefix: "build(helm): "
88106
labels:
89107
- "dependencies"
90-
- "github-actions"
91-
- "ci-cd"
108+
- "helm"
109+
- "automated"
92110

93-
# Terraform modules (if any)
94-
- package-ecosystem: "terraform"
95-
directory: "/deployments/multi-region/terraform"
111+
# Python dependencies (for rag-python module)
112+
- package-ecosystem: "pip"
113+
directory: "/rag-python"
96114
schedule:
97115
interval: "weekly"
98-
day: "monday"
116+
day: "thursday"
99117
time: "06:00"
100-
open-pull-requests-limit: 3
118+
timezone: "UTC"
119+
open-pull-requests-limit: 5
101120
reviewers:
102-
- "infrastructure-team"
121+
- "thc1006"
103122
assignees:
104-
- "devops-team"
123+
- "thc1006"
105124
commit-message:
106-
prefix: "terraform"
107-
include: "scope"
125+
prefix: "build(python): "
108126
labels:
109127
- "dependencies"
110-
- "terraform"
111-
- "infrastructure"
128+
- "python"
129+
- "rag"
130+
- "automated"
131+
132+
# Global settings for all ecosystems
133+
enable-beta-ecosystems: true
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "CodeQL Advanced Security Analysis"
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
schedule:
9+
- cron: '30 2 * * 1' # Monday at 2:30 AM UTC
10+
11+
jobs:
12+
analyze:
13+
name: "CodeQL Analysis"
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 30
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'go', 'javascript', 'python' ]
25+
26+
steps:
27+
- name: "Checkout Repository"
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: "Initialize CodeQL"
33+
uses: github/codeql-action/init@v3
34+
with:
35+
languages: ${{ matrix.language }}
36+
config-file: ./.github/codeql/codeql-config.yml
37+
# Use custom queries for telecommunications security
38+
queries: security-and-quality,security-experimental
39+
40+
- name: "Setup Go (for Go analysis)"
41+
if: matrix.language == 'go'
42+
uses: actions/setup-go@v5
43+
with:
44+
go-version: '1.24.1'
45+
cache: true
46+
47+
- name: "Build Go Project (for Go analysis)"
48+
if: matrix.language == 'go'
49+
run: |
50+
make deps
51+
make generate
52+
make build
53+
54+
- name: "Setup Python (for Python analysis)"
55+
if: matrix.language == 'python'
56+
uses: actions/setup-python@v4
57+
with:
58+
python-version: '3.11'
59+
60+
- name: "Install Python Dependencies (for Python analysis)"
61+
if: matrix.language == 'python'
62+
run: |
63+
if [ -f requirements-rag.txt ]; then
64+
pip install -r requirements-rag.txt
65+
fi
66+
67+
- name: "Perform CodeQL Analysis"
68+
uses: github/codeql-action/analyze@v3
69+
with:
70+
category: "/language:${{matrix.language}}"
71+
upload: true
72+
73+
- name: "Upload CodeQL Results"
74+
if: always()
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: codeql-results-${{ matrix.language }}
78+
path: |
79+
/home/runner/work/_temp/codeql_databases/
80+
/home/runner/work/_temp/codeql-sarif-results/
81+
retention-days: 30

0 commit comments

Comments
 (0)