Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/pull_request_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,17 @@ jobs:
unzip -P intelowl tests/test_files.zip -d test_files
cp docker/env_file_app_template docker/env_file_app
cp docker/env_file_postgres_template docker/env_file_postgres
# Debugging: Print environment files
echo "=== env_file_app content ==="
cat docker/env_file_app
echo "=== env_file_postgres content ==="
cat docker/env_file_postgres

- name: Verify Docker Compose Setup
run: |
ls -la docker/
ls -la docker-compose*.yml || echo "No docker-compose files found in root"

- name: Startup script launch (Slow)
if: contains(github.base_ref, 'master')
run: |
cp docker/env_file_integrations_template docker/env_file_integrations
Expand All @@ -91,6 +100,14 @@ jobs:
if: "!contains(github.base_ref, 'master')"
run: |
./start ci up -- --build -d
sleep 15
docker ps -a
echo "=== intelowl_uwsgi logs ==="
docker logs intelowl_uwsgi || true
echo "=== intelowl_postgres logs ==="
docker logs intelowl_postgres || true
echo "=== intelowl_redis logs ==="
docker logs intelowl_redis || true
env:
DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: "plain"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,30 @@ def migrate(apps, schema_editor):
playbook_config = apps.get_model("playbooks_manager", "PlaybookConfig")
AnalyzerConfig = apps.get_model("analyzers_manager", "AnalyzerConfig")
pc = playbook_config.objects.get(name="FREE_TO_USE_ANALYZERS")
pc2 = playbook_config.objects.get(name="Dns")
pc.analyzers.add(AnalyzerConfig.objects.get(name="AdGuard").id)
pc2.analyzers.add(AnalyzerConfig.objects.get(name="AdGuard").id)
pc.full_clean()
pc.save()
pc2.full_clean()
pc2.save()

pc2 = playbook_config.objects.filter(name="Dns").first() or playbook_config.objects.filter(name="DNS").first()
if pc2:
pc2.analyzers.add(AnalyzerConfig.objects.get(name="AdGuard").id)
pc2.full_clean()
pc2.save()


def reverse_migrate(apps, schema_editor):
playbook_config = apps.get_model("playbooks_manager", "PlaybookConfig")
AnalyzerConfig = apps.get_model("analyzers_manager", "AnalyzerConfig")
pc = playbook_config.objects.get(name="FREE_TO_USE_ANALYZERS")
pc2 = playbook_config.objects.get(name="Dns")
pc.analyzers.remove(AnalyzerConfig.objects.get(name="AdGuard").id)
pc2.analyzers.remove(AnalyzerConfig.objects.get(name="AdGuard").id)
pc.full_clean()
pc.save()
pc2.full_clean()
pc2.save()

pc2 = playbook_config.objects.filter(name="Dns").first() or playbook_config.objects.filter(name="DNS").first()
if pc2:
pc2.analyzers.remove(AnalyzerConfig.objects.get(name="AdGuard").id)
pc2.full_clean()
pc2.save()


class Migration(migrations.Migration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,42 @@ def migrate(apps, schema_editor):
playbook_config = apps.get_model("playbooks_manager", "PlaybookConfig")
AnalyzerConfig = apps.get_model("analyzers_manager", "AnalyzerConfig")
pc = playbook_config.objects.get(name="FREE_TO_USE_ANALYZERS")
pc2 = playbook_config.objects.get(name="Dns")
pc.analyzers.add(
AnalyzerConfig.objects.get(name="UltraDNS_DNS").id,
AnalyzerConfig.objects.get(name="UltraDNS_Malicious_Detector").id,
)
pc2.analyzers.add(
AnalyzerConfig.objects.get(name="UltraDNS_DNS").id,
AnalyzerConfig.objects.get(name="UltraDNS_Malicious_Detector").id,
)
pc.full_clean()
pc.save()
pc2.full_clean()
pc2.save()

pc2 = playbook_config.objects.filter(name="Dns").first() or playbook_config.objects.filter(name="DNS").first()
if pc2:
pc2.analyzers.add(
AnalyzerConfig.objects.get(name="UltraDNS_DNS").id,
AnalyzerConfig.objects.get(name="UltraDNS_Malicious_Detector").id,
)
pc2.full_clean()
pc2.save()


def reverse_migrate(apps, schema_editor):
playbook_config = apps.get_model("playbooks_manager", "PlaybookConfig")
AnalyzerConfig = apps.get_model("analyzers_manager", "AnalyzerConfig")
pc = playbook_config.objects.get(name="FREE_TO_USE_ANALYZERS")
pc2 = playbook_config.objects.get(name="Dns")

pc.analyzers.remove(
AnalyzerConfig.objects.get(name="UltraDNS_DNS").id,
AnalyzerConfig.objects.get(name="UltraDNS_Malicious_Detector").id,
)
pc.full_clean()
pc.save()
pc2.analyzers.remove(
AnalyzerConfig.objects.get(name="UltraDNS_DNS").id,
AnalyzerConfig.objects.get(name="UltraDNS_Malicious_Detector").id,
)
pc2.full_clean()
pc2.save()

pc2 = playbook_config.objects.filter(name="Dns").first() or playbook_config.objects.filter(name="DNS").first()
if pc2:
pc2.analyzers.remove(
AnalyzerConfig.objects.get(name="UltraDNS_DNS").id,
AnalyzerConfig.objects.get(name="UltraDNS_Malicious_Detector").id,
)
pc2.full_clean()
pc2.save()


class Migration(migrations.Migration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def migrate(apps, schema_editor):
analyzer_objs = list(AnalyzerConfig.objects.filter(name__in=new_analyzers))

# Playbooks to update
playbook_names = ["FREE_TO_USE_ANALYZERS", "Dns"]
playbook_names = ["FREE_TO_USE_ANALYZERS", "Dns", "DNS"]

for pb_name in playbook_names:
pc = PlaybookConfig.objects.filter(name=pb_name).first()
Expand All @@ -31,7 +31,7 @@ def reverse_migrate(apps, schema_editor):
new_analyzers = ["DNS4EU", "DNS4EU_Malicious_Detector"]
analyzer_objs = list(AnalyzerConfig.objects.filter(name__in=new_analyzers))

playbook_names = ["FREE_TO_USE_ANALYZERS", "Dns"]
playbook_names = ["FREE_TO_USE_ANALYZERS", "Dns", "DNS"]

for pb_name in playbook_names:
pc = PlaybookConfig.objects.filter(name=pb_name).first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,38 @@ def migrate(apps, schema_editor):
playbook_config = apps.get_model("playbooks_manager", "PlaybookConfig")
AnalyzerConfig = apps.get_model("analyzers_manager", "AnalyzerConfig")
pc = playbook_config.objects.get(name="FREE_TO_USE_ANALYZERS")
pc2 = playbook_config.objects.get(name="Dns")
pc.analyzers.add(
AnalyzerConfig.objects.get(name="CleanBrowsing_Malicious_Detector").id,
)
pc2.analyzers.add(
AnalyzerConfig.objects.get(name="CleanBrowsing_Malicious_Detector").id,
)
pc.full_clean()
pc.save()
pc2.full_clean()
pc2.save()

pc2 = playbook_config.objects.filter(name="Dns").first() or playbook_config.objects.filter(name="DNS").first()
if pc2:
pc2.analyzers.add(
AnalyzerConfig.objects.get(name="CleanBrowsing_Malicious_Detector").id,
)
pc2.full_clean()
pc2.save()


def reverse_migrate(apps, schema_editor):
playbook_config = apps.get_model("playbooks_manager", "PlaybookConfig")
AnalyzerConfig = apps.get_model("analyzers_manager", "AnalyzerConfig")
pc = playbook_config.objects.get(name="FREE_TO_USE_ANALYZERS")
pc2 = playbook_config.objects.get(name="Dns")

pc.analyzers.remove(
AnalyzerConfig.objects.get(name="CleanBrowsing_Malicious_Detector").id,
)
pc.full_clean()
pc.save()
pc2.analyzers.remove(
AnalyzerConfig.objects.get(name="CleanBrowsing_Malicious_Detector").id,
)
pc2.full_clean()
pc2.save()

pc2 = playbook_config.objects.filter(name="Dns").first() or playbook_config.objects.filter(name="DNS").first()
if pc2:
pc2.analyzers.remove(
AnalyzerConfig.objects.get(name="CleanBrowsing_Malicious_Detector").id,
)
pc2.full_clean()
pc2.save()


class Migration(migrations.Migration):
Expand Down
27 changes: 27 additions & 0 deletions api_app/playbooks_manager/migrations/0063_rename_dns_playbook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is a part of IntelOwl https://github.com/intelowlproject/IntelOwl
# See the file 'LICENSE' for copying permission.


from django.db import migrations


def migrate(apps, schema_editor):
PlaybookConfig = apps.get_model("playbooks_manager", "PlaybookConfig")
if not PlaybookConfig.objects.filter(name="DNS").exists():
PlaybookConfig.objects.filter(name="Dns").update(name="DNS")


def reverse_migrate(apps, schema_editor):
PlaybookConfig = apps.get_model("playbooks_manager", "PlaybookConfig")
if not PlaybookConfig.objects.filter(name="Dns").exists():
PlaybookConfig.objects.filter(name="DNS").update(name="Dns")


class Migration(migrations.Migration):
dependencies = [
("playbooks_manager", "0062_add_cleanbrowsing_to_free_to_use"),
]

operations = [
migrations.RunPython(migrate, reverse_migrate),
]
15 changes: 15 additions & 0 deletions docker/ci.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ services:


daphne:
build:
context: ..
dockerfile: docker/Dockerfile
args:
REPO_DOWNLOADER_ENABLED: ${REPO_DOWNLOADER_ENABLED}
Comment on lines +23 to +27
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adds build configuration to the daphne service. While this ensures consistency with the uwsgi service configuration above, it's unclear if this change is intentional and related to the playbook rename, or if it's an unrelated change that was accidentally included. Please clarify if this docker configuration change is necessary for the DNS playbook rename.

Copilot uses AI. Check for mistakes.
image: intelowlproject/intelowl:ci
env_file:
- env_file_app_ci
Expand All @@ -43,6 +48,11 @@ services:
memory: 200M

celery_beat:
build:
context: ..
dockerfile: docker/Dockerfile
args:
REPO_DOWNLOADER_ENABLED: ${REPO_DOWNLOADER_ENABLED}
Comment on lines +51 to +55
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adds build configuration to the celery_beat service. Similar to the daphne service, it's unclear if this change is intentional and related to the playbook rename, or if it's an unrelated change. Please clarify if this docker configuration change is necessary for the DNS playbook rename.

Copilot uses AI. Check for mistakes.
image: intelowlproject/intelowl:ci
env_file:
- env_file_app_ci
Expand All @@ -53,6 +63,11 @@ services:
memory: 200M

celery_worker_default:
build:
context: ..
dockerfile: docker/Dockerfile
args:
REPO_DOWNLOADER_ENABLED: ${REPO_DOWNLOADER_ENABLED}
Comment on lines +66 to +70
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change adds build configuration to the celery_worker_default service. Similar to the other services, it's unclear if this change is intentional and related to the playbook rename, or if it's an unrelated change. Please clarify if this docker configuration change is necessary for the DNS playbook rename.

Copilot uses AI. Check for mistakes.
image: intelowlproject/intelowl:ci
env_file:
- env_file_app_ci
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.0",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@testing-library/dom": "^10.4.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("test AnalyzableOverview", () => {
data: {
jobs: [
{
playbook: "Dns",
playbook: "DNS",
id: 13,
user: "admin",
date: jobDate,
Expand Down Expand Up @@ -216,7 +216,7 @@ describe("test AnalyzableOverview", () => {
const scannerBadge = container.querySelector("#tag__row0_0");
expect(scannerBadge).toBeInTheDocument();
expect(
screen.getByRole("cell", { name: "Playbook executed: Dns" }),
screen.getByRole("cell", { name: "Playbook executed: DNS" }),
).toBeInTheDocument();
// cell - user event (artifact)
expect(screen.getByRole("cell", { name: "#6" })).toBeInTheDocument();
Expand Down Expand Up @@ -340,7 +340,7 @@ describe("test AnalyzableOverview", () => {
const scannerBadge = container.querySelector("#tag__row0_0");
expect(scannerBadge).toBeInTheDocument();
expect(
screen.getByRole("cell", { name: "Playbook executed: Dns" }),
screen.getByRole("cell", { name: "Playbook executed: DNS" }),
).toBeInTheDocument();
// cell - user event (artifact)
expect(screen.getByRole("cell", { name: "#6" })).toBeInTheDocument();
Expand Down
10 changes: 5 additions & 5 deletions frontend/tests/components/dashboard/charts.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,23 +320,23 @@ describe("test dashboard's charts", () => {
useAxios.mockReturnValue([
{
data: {
values: ["Dns", "FREE_TO_USE_ANALYZERS", "Passive_DNS"],
values: ["DNS", "FREE_TO_USE_ANALYZERS", "Passive_DNS"],
aggregation: [
{
date: "2024-11-28T22:00:00Z",
Dns: 5,
DNS: 5,
FREE_TO_USE_ANALYZERS: 1,
Passive_DNS: 3,
},
{
date: "2024-11-29T22:00:00Z",
Dns: 1,
DNS: 1,
FREE_TO_USE_ANALYZERS: 0,
Passive_DNS: 0,
},
{
date: "2024-11-29T23:00:00Z",
Dns: 1,
DNS: 1,
FREE_TO_USE_ANALYZERS: 0,
Passive_DNS: 0,
},
Expand Down Expand Up @@ -367,7 +367,7 @@ describe("test dashboard's charts", () => {
`${new Date("2024-11-29T23:00:00Z").getDate()}/${new Date("2024-11-29T23:00:00Z").getMonth() + 1}, ${hours}:00`,
),
).toBeInTheDocument();
expect(screen.getByText("Dns")).toBeInTheDocument();
expect(screen.getByText("DNS")).toBeInTheDocument();
expect(screen.getByText("FREE_TO_USE_ANALYZERS")).toBeInTheDocument();
expect(screen.getByText("Passive_DNS")).toBeInTheDocument();
});
Expand Down
Loading
Loading