Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
704 commits
Select commit Hold shift + click to select a range
5520a84
fix client ip not showing in audit log for sso logon and disable some…
Oct 22, 2024
4fd772e
update reqs
wh1te909 Oct 24, 2024
c28d800
blacked
wh1te909 Oct 24, 2024
faa0e6c
handle orphaned sso providers
wh1te909 Oct 25, 2024
0bd09d0
fix tests
wh1te909 Oct 25, 2024
2c09ad6
update headers
wh1te909 Oct 25, 2024
0383043
move sso settings
wh1te909 Oct 25, 2024
0d021a8
use exists
wh1te909 Oct 25, 2024
0f86bbf
disable password/mfa reset views if block_local_logon is enabled
Oct 29, 2024
18b1afe
formatting
Oct 29, 2024
8d543dc
move inside if block
wh1te909 Oct 29, 2024
2cbecaa
don't show providers list on login screen if sso is disabled globally
wh1te909 Oct 30, 2024
41e3d1f
move check to signup
wh1te909 Oct 30, 2024
a6166a1
add random otp to social accounts
wh1te909 Oct 31, 2024
ec0a2dc
handle deployment config updates
wh1te909 Oct 31, 2024
cc1f640
set icon based on provider
wh1te909 Nov 1, 2024
3851b09
modify settings instead of local_settings
wh1te909 Nov 3, 2024
5bec476
forgot frontend
wh1te909 Nov 3, 2024
9624af4
fix tests
wh1te909 Nov 3, 2024
f8314e0
fix pop
wh1te909 Nov 4, 2024
4a5bfee
fix failsafe to ensure no lockouts and add self-reset sso perms
wh1te909 Nov 4, 2024
46c5128
move callback url info to the backend
wh1te909 Nov 4, 2024
fb47022
redo migrations
wh1te909 Nov 4, 2024
c35da67
update reqs
wh1te909 Nov 5, 2024
0d34831
also check if first name only and display
wh1te909 Nov 6, 2024
86816ce
move name stuff to the correct view and add email fallback
wh1te909 Nov 10, 2024
6394734
remove deprecated login endpoints
wh1te909 Nov 15, 2024
150e319
refurb
wh1te909 Nov 15, 2024
ecf5646
update reqs
wh1te909 Nov 15, 2024
7f9fc48
revert as these haven't changed [skip ci]
wh1te909 Nov 15, 2024
d1df406
call sync mesh after sso user created
wh1te909 Nov 16, 2024
91c33b0
add setting override to disable sso
wh1te909 Nov 16, 2024
ddba83b
Merge pull request #2001 from sadnub/sso
wh1te909 Nov 20, 2024
ad4cddb
bump web ver [skip ci]
wh1te909 Nov 20, 2024
c6b667f
bump version [skip ci]
wh1te909 Nov 21, 2024
6d4fe84
back to dev [skip ci]
wh1te909 Nov 22, 2024
e505d07
add server maintenance mode mgmt command
wh1te909 Nov 22, 2024
5ee2a3c
update readme
wh1te909 Nov 28, 2024
0a2547d
fix cors error
wh1te909 Jan 21, 2025
83b4d8c
fix tests
wh1te909 Jan 21, 2025
10fd075
fix for celery workers stop consuming tasks when connection to redis …
wh1te909 Feb 1, 2025
e4fb4ac
update reqs
wh1te909 Feb 3, 2025
079c987
bump webver
wh1te909 Feb 3, 2025
d5fc77e
update jinja
wh1te909 Feb 3, 2025
0669a12
bump version
wh1te909 Feb 4, 2025
41aa84f
back to dev [skip ci]
wh1te909 Feb 4, 2025
c6a3a1a
update backup script to version 33 and exclude meshcentral-recordings…
silversword411 Feb 5, 2025
8fa3f5d
Merge pull request #2135 from silversword411/develop
wh1te909 Feb 7, 2025
e12c454
monitoring view v2
wh1te909 Jan 24, 2025
b87272c
debugging black
wh1te909 Jan 24, 2025
28e65f9
blacked
wh1te909 Jan 24, 2025
79fea4c
fix flake
wh1te909 Jan 24, 2025
e49e664
use user permissions when creating the queryset
Feb 13, 2025
b0cef90
add date header to emails fixes #2123
wh1te909 Feb 13, 2025
34e2174
feat: posix tasks
wh1te909 Feb 18, 2025
3355a78
add missing req for tests
wh1te909 Feb 18, 2025
660bc2f
fix imports
wh1te909 Feb 19, 2025
afe6fcc
fix mock
wh1te909 Feb 19, 2025
b4e3f6a
move imports for celery
wh1te909 Feb 20, 2025
b56f4d9
fix import
wh1te909 Feb 20, 2025
964fef8
fix another import
wh1te909 Feb 20, 2025
1c716dc
remove celerybeat db on service restart
wh1te909 Feb 21, 2025
5ebb78d
add optional setting to disable some tasks
wh1te909 Feb 21, 2025
e1e9a1a
blacked
wh1te909 Feb 24, 2025
6c5a363
not all models have a filter by role attr
wh1te909 Feb 24, 2025
6be6876
Merge pull request #2141 from sadnub/feat-reportingpermissions
wh1te909 Feb 24, 2025
1a7631b
Merge pull request #2125 from amidaware/1.0.0
wh1te909 Feb 24, 2025
340ce9b
workaround for possible race condition
wh1te909 Feb 25, 2025
3b06730
update reqs
wh1te909 Feb 25, 2025
dc3de83
detect lxc
wh1te909 Feb 25, 2025
e00fef2
fix snippets in server scripts
wh1te909 Feb 25, 2025
7c5f0df
add random jitter to check run interval #2040
wh1te909 Feb 27, 2025
4c5504f
add notes model to reporting
wh1te909 Mar 3, 2025
ec2297d
bump versions
wh1te909 Mar 4, 2025
9b78838
bump script ver [skip ci]
wh1te909 Mar 4, 2025
0572009
bump version
wh1te909 Mar 5, 2025
07731aa
back to dev [skip ci]
wh1te909 Mar 5, 2025
b98fe31
Used THIS_SCRIPT variable within wget to allow execution from any dir…
nativeit Mar 7, 2025
ec32d67
Update troubleshoot_server.sh
dinger1986 Mar 12, 2025
aed4bb9
Update troubleshoot_server.sh
dinger1986 Mar 12, 2025
f232c4e
Update troubleshoot_server.sh
dinger1986 Mar 12, 2025
53788a8
fix import
wh1te909 Mar 13, 2025
07ca223
fix for sync breaking if agent has issue getting mesh node id
wh1te909 Mar 13, 2025
b1925a0
Merge pull request #2169 from dinger1986/develop
wh1te909 Mar 18, 2025
aef2443
updates for demo
wh1te909 Mar 21, 2025
8794596
add hex node id to api
wh1te909 Mar 27, 2025
e5fbc76
update reqs
wh1te909 Mar 28, 2025
5d017fc
more demo stuff
wh1te909 Mar 28, 2025
17ca524
update reqs
wh1te909 Mar 31, 2025
1104bd3
update nats-api reqs
wh1te909 Mar 31, 2025
6474564
update bins
wh1te909 Mar 31, 2025
71ff1f2
update nats server
wh1te909 Mar 31, 2025
508fee2
isort
wh1te909 Apr 1, 2025
54ba53c
more demo stuff
wh1te909 Apr 2, 2025
a0bb85e
optimize query
wh1te909 Apr 6, 2025
704b222
feat: VNC
wh1te909 Apr 6, 2025
ab2c0f6
bump versions
wh1te909 Apr 6, 2025
91f0b55
add success return codes
Apr 10, 2025
1bf7a0d
Merge pull request #2164 from nativeit/develop
wh1te909 Apr 11, 2025
ad4144d
add migrations for new timezones
wh1te909 Apr 20, 2025
441632c
bump script ver
wh1te909 Apr 21, 2025
fbbd16a
start v4
wh1te909 Apr 21, 2025
67e4806
more audit logging for test script runs closes #2060
wh1te909 Apr 21, 2025
a618787
add success_return_codes to fields to copy constant
sadnub Apr 22, 2025
64c3a13
Merge pull request #2217 from sadnub/feat-success_return_codes
wh1te909 Apr 22, 2025
ca14815
update reqs
wh1te909 Apr 23, 2025
db57e78
update bins
wh1te909 Apr 23, 2025
499f075
exclude posix from win update logging fixes #2196
wh1te909 Apr 24, 2025
07ae4da
bump versions
wh1te909 Apr 28, 2025
a4538d7
pin pip version
wh1te909 Apr 28, 2025
7297cd4
back to dev [skip ci]
wh1te909 Apr 28, 2025
c64800f
add mgmt cmd for celery queue len
wh1te909 Apr 29, 2025
af0044e
switch to bigint
wh1te909 Apr 30, 2025
24de7af
disable compression to fix mesh issues fixes #2231
wh1te909 May 15, 2025
25905e2
restore nginx config if replaced by apt
wh1te909 May 24, 2025
a13afa0
log ws errors
wh1te909 Jun 8, 2025
21571f7
update reqs
wh1te909 Jun 8, 2025
cb1fe96
fix agent count not working with insecure installs
wh1te909 Jun 13, 2025
1ba4e88
added server 2025
P6g9YHK6 Jul 15, 2025
4a4f273
fix username validation fixes #2265
wh1te909 Aug 4, 2025
4f5351b
update ansible stuff
wh1te909 Aug 5, 2025
e239b5e
letsencrypt ended ocsp support
wh1te909 Aug 23, 2025
4b20f3e
actually exclude agents when checking client and site agents
Aug 24, 2025
41d4e88
Merge pull request #2280 from sadnub/fix-automation-excluded-agents f…
wh1te909 Aug 26, 2025
ba919eb
Merge pull request #2258 from P6g9YHK6/develop
wh1te909 Aug 26, 2025
3b869cf
remove deprecated view
wh1te909 Aug 26, 2025
a6fcf34
update natsapi reqs
wh1te909 Aug 27, 2025
aeb6281
update bins
wh1te909 Aug 27, 2025
bdce94d
update reqs
wh1te909 Aug 27, 2025
51bfae9
pin silk
wh1te909 Sep 1, 2025
376b2c4
feat: uninstall software
wh1te909 Sep 4, 2025
e6e78a6
Fixed duplicate hostnames in subject and include Client/Site in resol…
BuddiesD Sep 19, 2025
450f7bf
update reqs
wh1te909 Oct 1, 2025
94ab177
update nats and reqs
wh1te909 Oct 3, 2025
6c9bcaa
scheduled reports init
Jun 5, 2025
b64e0f7
set report history prune days to 0, add daily schedulers options
Jun 15, 2025
ebf302d
add run report schedule option. refactor report running to avoid code…
Jun 16, 2025
b09274e
set last_run when report schedule is ran. Implement locked_at when re…
Jun 16, 2025
ea0bfc3
code formatting
Jun 16, 2025
45f4f9c
fix email sending
Jun 16, 2025
9fcf0ac
fix db, merge migrations into one and code formatting
Jun 16, 2025
fc14dfe
fix scheduler functions
Jun 16, 2025
c691bc6
fix schedule functions
Jun 16, 2025
2a24b70
fix schedule reports erroring out
Jun 17, 2025
1ddf22b
black
wh1te909 Jun 17, 2025
c0c5cca
revert to newer email library API
wh1te909 Jun 21, 2025
11b932e
allow customizing the scheduled report template emails
Jun 23, 2025
6541f02
allow emailing a report ad hoc from report manager
Jun 23, 2025
02e9b91
notify if schedule can't be deleted if in use
wh1te909 Jun 27, 2025
93aa4cb
blacked
wh1te909 Jun 27, 2025
c92da55
fix confusing double-negative logic
wh1te909 Jun 27, 2025
b07f36b
fix keyerror if no email settings are set
wh1te909 Jun 28, 2025
15c0644
fix asset upload
wh1te909 Jun 28, 2025
8827768
fix keyerror in view
wh1te909 Jun 28, 2025
3001560
add timezone field to report schedule
Jul 15, 2025
90a7a03
add tests for scheduler and new reporting views
Jul 15, 2025
610dfd3
formatting
Jul 15, 2025
4391266
fix flake
Jul 15, 2025
2114c74
merge report datasource properties PR
Jul 16, 2025
073f408
merge migrations into a single file
Jul 17, 2025
0df1a87
add error handling and move to constants
wh1te909 Sep 17, 2025
59c550a
modify serializer to only show relevant fields based on schedule type
wh1te909 Sep 18, 2025
c34f60d
audit schedules and report schedules
wh1te909 Sep 18, 2025
f7aab63
fix audit serializer
wh1te909 Sep 19, 2025
52b1e49
attach html to email and add plaintext/csv attachments
wh1te909 Sep 26, 2025
534d9d2
Merge pull request #2239 from sadnub/feat-scheduledreports
wh1te909 Oct 10, 2025
428817c
Revert unintended model field changes
BuddiesD Oct 10, 2025
6ff36f5
-
BuddiesD Oct 10, 2025
de93b18
bump app and web vers
wh1te909 Oct 14, 2025
8ab5bf2
update uwsgi
wh1te909 Oct 14, 2025
589e3b5
add tz migration
wh1te909 Oct 14, 2025
e8c47cf
bump version
wh1te909 Oct 15, 2025
3398792
back to dev [skip ci]
wh1te909 Oct 15, 2025
74b19a4
fix scheduled reports if timezone set on schedule
wh1te909 Oct 15, 2025
525febc
bump version
wh1te909 Oct 15, 2025
03c50d1
back to dev [skip ci]
wh1te909 Oct 15, 2025
c505b12
update demo [skip ci]
wh1te909 Oct 15, 2025
900aa9a
add optional override to local settings
wh1te909 Nov 13, 2025
5d1ef67
Allow override of cookie domains via Docker environment
Thalagyrt Nov 25, 2025
22fc437
update reqs
wh1te909 Nov 27, 2025
0746f73
feat: add live stream commands support
fahadkhan-fk Aug 13, 2025
00fb8b6
feat: update reload_nats function
fahadkhan-fk Aug 18, 2025
36d2578
feat: add cmd_id with each stream msg
fahadkhan-fk Aug 20, 2025
69bdef3
feat: add audit log support
fahadkhan-fk Aug 21, 2025
70cb35e
feat: use channel_name as key
fahadkhan-fk Aug 25, 2025
79845e9
feat: remove agent subscribe for cmdoutput subject
fahadkhan-fk Aug 26, 2025
34d7ab2
feat: remove stream buffer to collect output
fahadkhan-fk Aug 27, 2025
42b0805
fix: include history ID in streaming command payload for result tracking
fahadkhan-fk Aug 27, 2025
4d38c91
style: reformat code using black
fahadkhan-fk Aug 27, 2025
15f2309
refactor: use async ORM for AgentHistory and AuditLog in CommandStrea…
fahadkhan-fk Aug 27, 2025
c59a340
feat: resolve flake8 lint issue
fahadkhan-fk Sep 1, 2025
946183a
feat: add tests related to CommandStreamConsumer
fahadkhan-fk Sep 2, 2025
812a426
fix: event loop in thread error
fahadkhan-fk Sep 2, 2025
ae21876
fix: event loop in thread error
fahadkhan-fk Sep 2, 2025
b80df40
feat: add tests related to NatsStreamCmd
fahadkhan-fk Sep 4, 2025
21bfbf3
feat: return 403 for not having permissions
fahadkhan-fk Sep 4, 2025
f74d470
feat: add more tests
fahadkhan-fk Sep 4, 2025
540ac19
feat: minor improvements
fahadkhan-fk Oct 9, 2025
0c51005
fix: tests
fahadkhan-fk Oct 9, 2025
e0d406b
fix: tests
fahadkhan-fk Oct 9, 2025
41c1df2
fix: tests
fahadkhan-fk Oct 9, 2025
5191440
fix: tests
fahadkhan-fk Oct 9, 2025
c1e70f0
fix: tests
fahadkhan-fk Oct 14, 2025
bfb51bc
feat: resolve integrity error
fahadkhan-fk Oct 14, 2025
7389cd8
fix: tests
fahadkhan-fk Oct 14, 2025
0318fb7
fix pattern
wh1te909 Nov 27, 2025
a416eee
isort
wh1te909 Nov 27, 2025
2e4df44
revert fix
wh1te909 Nov 27, 2025
cc79baf
add version check
wh1te909 Nov 28, 2025
df8039a
fix tests
wh1te909 Nov 28, 2025
c3c5a2c
Merge pull request #2275 from fahadkhan-fk/feature-cmd-stream
wh1te909 Nov 28, 2025
2b04ed1
feat: add endpoints related to browse, create and delete registry key
fahadkhan-fk Sep 17, 2025
dc75137
feat: get path from query params
fahadkhan-fk Sep 17, 2025
ac90905
feat: add endpoint related to renaming key in registry
fahadkhan-fk Sep 29, 2025
12206d0
feat: add endpoints related to create,delete,rename and modify value
fahadkhan-fk Oct 2, 2025
cd3d74f
feat: enhance registry APIs
fahadkhan-fk Oct 8, 2025
b4d83e3
feat: add tests related to registry
fahadkhan-fk Oct 14, 2025
0166f7c
feat: add can_use_registry permission in manager
fahadkhan-fk Nov 3, 2025
adfbb0e
Fix: resolve migration conflict and reapply can_use_registry field
fahadkhan-fk Nov 10, 2025
42f4be1
add perms and add defer
wh1te909 Nov 10, 2025
ae18a9b
add version check
wh1te909 Nov 10, 2025
3409f8a
fix lint
wh1te909 Nov 10, 2025
2e416a8
refactor: registry views with reusable utils and version check
fahadkhan-fk Nov 12, 2025
615ffe3
fix: tests
fahadkhan-fk Nov 12, 2025
e067e55
isort
wh1te909 Nov 29, 2025
ef2e5bb
fix version
wh1te909 Nov 29, 2025
1eaac58
Merge pull request #2359 from Thalagyrt/patch-docker-entrypoint-cooki…
wh1te909 Dec 1, 2025
f9f8ba1
update reqs
wh1te909 Dec 8, 2025
417482d
fix race condition for manual tasks randomly triggering
wh1te909 Dec 11, 2025
fc6c129
update nushell
wh1te909 Dec 11, 2025
5099b87
improve dashboard loading times #1705 #2063 #2195
wh1te909 Dec 17, 2025
1a3ab6f
Merge pull request #2294 from BuddiesD/fixed-duplicate-hostnames
wh1te909 Dec 29, 2025
ac2b92e
Merge branch 'develop' into feature-registry
wh1te909 Dec 29, 2025
1020a66
Merge pull request #2301 from fahadkhan-fk/feature-registry
wh1te909 Dec 29, 2025
54768d2
reporting fixes
wh1te909 Dec 31, 2025
090ed27
update reqs
wh1te909 Dec 31, 2025
9ef7e66
update reqs
wh1te909 Jan 5, 2026
cb38acd
add redis lock to task
wh1te909 Jan 7, 2026
cf7c682
update reqs and bump versions
wh1te909 Jan 8, 2026
87d42c8
use a constant and relpath
wh1te909 Jan 12, 2026
d3621fd
add generic mixin
wh1te909 Jan 13, 2026
d7624ad
add gate for race condition
wh1te909 Jan 13, 2026
9ca5af0
add registry editor
wh1te909 Jan 14, 2026
6f10951
bump versions
wh1te909 Jan 14, 2026
8130ab9
cleanup unused function
wh1te909 Feb 5, 2026
9a03e61
updates for demo
wh1te909 Feb 5, 2026
405d384
update reqs
wh1te909 Feb 5, 2026
601aea2
blacked
wh1te909 Feb 5, 2026
d33168c
fix ci
wh1te909 Feb 17, 2026
308af18
add filter
wh1te909 Feb 19, 2026
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
14 changes: 7 additions & 7 deletions .devcontainer/api.dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# pulls community scripts from git repo
FROM python:3.11.4-slim AS GET_SCRIPTS_STAGE
FROM python:3.11.8-slim AS GET_SCRIPTS_STAGE

RUN apt-get update &&
apt-get install -y --no-install-recommends git &&
RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
git clone https://github.com/amidaware/community-scripts.git /community-scripts

FROM python:3.11.4-slim
FROM python:3.11.8-slim

ENV TACTICAL_DIR /opt/tactical
ENV TACTICAL_READY_FILE ${TACTICAL_DIR}/tmp/tactical.ready
Expand All @@ -17,10 +17,10 @@ ENV PYTHONUNBUFFERED=1

EXPOSE 8000 8383 8005

RUN apt-get update &&
apt-get install -y build-essential
RUN apt-get update && \
apt-get install -y build-essential weasyprint

RUN groupadd -g 1000 tactical &&
RUN groupadd -g 1000 tactical && \
useradd -u 1000 -g 1000 tactical

# copy community scripts
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ services:
- "443:4443"
volumes:
- tactical-data-dev:/opt/tactical
- ..:/workspace:cached

volumes:
tactical-data-dev: null
Expand Down
46 changes: 35 additions & 11 deletions .devcontainer/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ function check_tactical_ready {
}

function django_setup {
until (echo > /dev/tcp/"${POSTGRES_HOST}"/"${POSTGRES_PORT}") &> /dev/null; do
until (echo >/dev/tcp/"${POSTGRES_HOST}"/"${POSTGRES_PORT}") &>/dev/null; do
echo "waiting for postgresql container to be ready..."
sleep 5
done

until (echo > /dev/tcp/"${MESH_SERVICE}"/4443) &> /dev/null; do
until (echo >/dev/tcp/"${MESH_SERVICE}"/4443) &>/dev/null; do
echo "waiting for meshcentral container to be ready..."
sleep 5
done
Expand All @@ -49,8 +49,11 @@ function django_setup {
MESH_TOKEN="$(cat ${TACTICAL_DIR}/tmp/mesh_token)"

DJANGO_SEKRET=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 80 | head -n 1)

localvars="$(cat << EOF

BASE_DOMAIN=$(echo "import tldextract; no_fetch_extract = tldextract.TLDExtract(suffix_list_urls=()); extracted = no_fetch_extract('${API_HOST}'); print(f'{extracted.domain}.{extracted.suffix}')" | python)

localvars="$(
cat <<EOF
SECRET_KEY = '${DJANGO_SEKRET}'

DEBUG = True
Expand All @@ -64,11 +67,17 @@ KEY_FILE = '${CERT_PRIV_PATH}'

SCRIPTS_DIR = '/community-scripts'

ALLOWED_HOSTS = ['${API_HOST}', '*']

ADMIN_URL = 'admin/'

CORS_ORIGIN_ALLOW_ALL = True
ALLOWED_HOSTS = ['${API_HOST}', '${APP_HOST}', '*']

CORS_ORIGIN_WHITELIST = ['https://${APP_HOST}']

SESSION_COOKIE_DOMAIN = '${BASE_DOMAIN}'
CSRF_COOKIE_DOMAIN = '${BASE_DOMAIN}'
CSRF_TRUSTED_ORIGINS = ['https://${API_HOST}', 'https://${APP_HOST}']

HEADLESS_FRONTEND_URLS = {'socialaccount_login_error': 'https://${APP_HOST}/account/provider/callback'}

DATABASES = {
'default': {
Expand All @@ -78,6 +87,17 @@ DATABASES = {
'PASSWORD': '${POSTGRES_PASS}',
'HOST': '${POSTGRES_HOST}',
'PORT': '${POSTGRES_PORT}',
},
'reporting': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '${POSTGRES_DB}',
'USER': 'reporting_user',
'PASSWORD': 'read_password',
'HOST': '${POSTGRES_HOST}',
'PORT': '${POSTGRES_PORT}',
'OPTIONS': {
'options': '-c default_transaction_read_only=on'
}
}
}

Expand All @@ -87,14 +107,16 @@ MESH_TOKEN_KEY = '${MESH_TOKEN}'
REDIS_HOST = '${REDIS_HOST}'
MESH_WS_URL = '${MESH_WS_URL}'
ADMIN_ENABLED = True
TRMM_INSECURE = True
EOF
)"
)"

echo "${localvars}" > ${WORKSPACE_DIR}/api/tacticalrmm/tacticalrmm/local_settings.py
echo "${localvars}" >${WORKSPACE_DIR}/api/tacticalrmm/tacticalrmm/local_settings.py

# run migrations and init scripts
"${VIRTUAL_ENV}"/bin/python manage.py pre_update_tasks
"${VIRTUAL_ENV}"/bin/python manage.py migrate --no-input
"${VIRTUAL_ENV}"/bin/python manage.py generate_json_schemas
"${VIRTUAL_ENV}"/bin/python manage.py collectstatic --no-input
"${VIRTUAL_ENV}"/bin/python manage.py initial_db_setup
"${VIRTUAL_ENV}"/bin/python manage.py initial_mesh_setup
Expand All @@ -104,9 +126,8 @@ EOF
"${VIRTUAL_ENV}"/bin/python manage.py create_natsapi_conf
"${VIRTUAL_ENV}"/bin/python manage.py create_installer_user
"${VIRTUAL_ENV}"/bin/python manage.py post_update_tasks


# create super user
# create super user
echo "from accounts.models import User; User.objects.create_superuser('${TRMM_USER}', 'admin@example.com', '${TRMM_PASS}') if not User.objects.filter(username='${TRMM_USER}').exists() else 0;" | python manage.py shell
}

Expand All @@ -120,13 +141,16 @@ if [ "$1" = 'tactical-init-dev' ]; then
mkdir -p /meshcentral-data
mkdir -p ${TACTICAL_DIR}/tmp
mkdir -p ${TACTICAL_DIR}/certs
mkdir -p ${TACTICAL_DIR}/reporting
mkdir -p ${TACTICAL_DIR}/reporting/assets
mkdir -p /mongo/data/db
mkdir -p /redis/data
touch /meshcentral-data/.initialized && chown -R 1000:1000 /meshcentral-data
touch ${TACTICAL_DIR}/tmp/.initialized && chown -R 1000:1000 ${TACTICAL_DIR}
touch ${TACTICAL_DIR}/certs/.initialized && chown -R 1000:1000 ${TACTICAL_DIR}/certs
touch /mongo/data/db/.initialized && chown -R 1000:1000 /mongo/data/db
touch /redis/data/.initialized && chown -R 1000:1000 /redis/data
touch ${TACTICAL_DIR}/reporting && chown -R 1000:1000 ${TACTICAL_DIR}/reporting
Copy link

Choose a reason for hiding this comment

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

Bug: Directory Conflict: mkdir vs. touch

Using touch on ${TACTICAL_DIR}/reporting after creating it as a directory with mkdir -p on line 144 will fail or create a file conflict. The directory ${TACTICAL_DIR}/reporting already exists from line 144, and touch cannot operate on an existing directory. This should either touch a file inside the directory like ${TACTICAL_DIR}/reporting/.initialized or be removed entirely since the directory and subdirectory are already created on lines 144-145.

Fix in Cursor Fix in Web

mkdir -p ${TACTICAL_DIR}/api/tacticalrmm/private/exe
mkdir -p ${TACTICAL_DIR}/api/tacticalrmm/private/log
touch ${TACTICAL_DIR}/api/tacticalrmm/private/log/django_debug.log
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ assignees: ''

**Installation Method:**
- [ ] Standard
- [ ] Standard with `--insecure` flag at install
- [ ] Docker

**Agent Info (please complete the following information):**
- Agent version (as shown in the 'Summary' tab of the agent from web UI):
- Agent OS: [e.g. Win 10 v2004, Server 2012 R2]
- Agent OS: [e.g. Win 10 v2004, Server 2016]

**Describe the bug**
A clear and concise description of what the bug is.
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@ jobs:
name: Tests
strategy:
matrix:
python-version: ["3.11.4"]
python-version: ["3.11.8"]

services:
postgres:
image: postgres:15
env:
POSTGRES_DB: pipeline
POSTGRES_USER: pipeline
POSTGRES_PASSWORD: pipeline123456
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3

- uses: harmon758/postgresql-action@v1
with:
postgresql version: "15"
postgresql db: "pipeline"
postgresql user: "pipeline"
postgresql password: "pipeline123456"
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand All @@ -45,14 +47,14 @@ jobs:
SETTINGS_FILE="tacticalrmm/settings.py"
SETUPTOOLS_VER=$(grep "^SETUPTOOLS_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
WHEEL_VER=$(grep "^WHEEL_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
pip install --upgrade pip
pip install pip==25.1
pip install setuptools==${SETUPTOOLS_VER} wheel==${WHEEL_VER}
pip install -r requirements.txt -r requirements-test.txt

- name: Codestyle black
working-directory: api
run: |
black --exclude migrations/ --check tacticalrmm
black --exclude migrations/ --check --diff tacticalrmm
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Get Github Tag
id: prep
run: |
echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Push Tactical Image
uses: docker/build-push-action@v2
with:
Expand All @@ -36,7 +36,7 @@ jobs:
file: ./docker/containers/tactical/dockerfile
platforms: linux/amd64
tags: tacticalrmm/tactical:${{ steps.prep.outputs.version }},tacticalrmm/tactical:latest

- name: Build and Push Tactical MeshCentral Image
uses: docker/build-push-action@v2
with:
Expand All @@ -46,7 +46,7 @@ jobs:
file: ./docker/containers/tactical-meshcentral/dockerfile
platforms: linux/amd64
tags: tacticalrmm/tactical-meshcentral:${{ steps.prep.outputs.version }},tacticalrmm/tactical-meshcentral:latest

- name: Build and Push Tactical NATS Image
uses: docker/build-push-action@v2
with:
Expand All @@ -56,7 +56,7 @@ jobs:
file: ./docker/containers/tactical-nats/dockerfile
platforms: linux/amd64
tags: tacticalrmm/tactical-nats:${{ steps.prep.outputs.version }},tacticalrmm/tactical-nats:latest

- name: Build and Push Tactical Frontend Image
uses: docker/build-push-action@v2
with:
Expand All @@ -66,7 +66,7 @@ jobs:
file: ./docker/containers/tactical-frontend/dockerfile
platforms: linux/amd64
tags: tacticalrmm/tactical-frontend:${{ steps.prep.outputs.version }},tacticalrmm/tactical-frontend:latest

- name: Build and Push Tactical Nginx Image
uses: docker/build-push-action@v2
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,6 @@ daphne.sock.lock
coverage.xml
setup_dev.yml
11env/
query_schema.json
gunicorn_config.py
set_local_config.py
Loading