-
Notifications
You must be signed in to change notification settings - Fork 357
Malware scanning #1267
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
Open
Joshua-Tihabwangye
wants to merge
13
commits into
activist-org:main
Choose a base branch
from
Joshua-Tihabwangye:Malware_Scanning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+229
−261
Open
Malware scanning #1267
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
305b703
Implementing the malware scanning functionality using PyClamd library.
Joshua-Tihabwangye a06f55d
I have created the malware scan functionality, using pyClamd
Joshua-Tihabwangye 7709042
Delete backend/utils/malware_scanner.py
Joshua-Tihabwangye 85ec9f6
Update .env.dev
Joshua-Tihabwangye 145f6b4
Update Dockerfile
Joshua-Tihabwangye de42f6f
Update serializers.py
Joshua-Tihabwangye 0c25228
Update docker-compose.yml
Joshua-Tihabwangye eb1b2a7
Merge branch 'main' into Malware_Scanning
Joshua-Tihabwangye a6d592b
Update serializers.py
Joshua-Tihabwangye 3870573
Update malware_scan.py
Joshua-Tihabwangye 13e0c49
Update serializers.py
Joshua-Tihabwangye 37f5cb9
Resolving failed checks
Joshua-Tihabwangye d7e4b0b
Modified views
Joshua-Tihabwangye 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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
ENVIRONMENT='development' | ||
FRONTEND_PORT=3000 | ||
|
||
FRONTEND_PORT="3000" | ||
VITE_FRONTEND_URL="http://localhost:3000" | ||
VITE_BACKEND_URL="http://localhost:8000" | ||
VITE_API_URL="http://localhost:8000/v1" | ||
VITE_FRONTEND_URL=http://localhost:3000 | ||
VITE_BACKEND_URL=http://localhost:8000 | ||
VITE_API_URL=http://localhost:8000/v1 | ||
|
||
ADMIN_PATH="admin/" | ||
BACKEND_PORT="8000" | ||
ADMIN_PATH=admin/ | ||
BACKEND_PORT=8000 | ||
DJANGO_ALLOWED_HOSTS="localhost *" | ||
DJANGO_CSRF_TRUSTED_ORIGINS="http://localhost" | ||
DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost | ||
|
||
# DB port should always be set to 5432. | ||
DATABASE_PORT="5432" | ||
DATABASE_PORT=5432 | ||
DATABASE_HOST=db | ||
DATABASE_NAME="activist" | ||
DATABASE_USER="postgres" | ||
DATABASE_PASSWORD="postgres" | ||
DATABASE_NAME=activist | ||
DATABASE_USER=postgres | ||
DATABASE_PASSWORD=postgres | ||
|
||
SECRET_KEY='secret' | ||
DEBUG='1' | ||
SECRET_KEY=secret | ||
DEBUG=1 | ||
|
||
ACTIVIST_EMAIL="[email protected]" | ||
EMAIL_HOST="smtp.activist.org" | ||
EMAIL_PORT="587" | ||
EMAIL_HOST_USER="[email protected]" | ||
EMAIL_HOST_PASSWORD="activist123!?" | ||
EMAIL_USE_TLS="True" | ||
[email protected] | ||
EMAIL_HOST=smtp.activist.org | ||
EMAIL_PORT=587 | ||
[email protected] | ||
EMAIL_HOST_PASSWORD=activist123!? | ||
EMAIL_USE_TLS=true | ||
|
||
ENVIRONMENT=development |
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 |
---|---|---|
@@ -1,12 +1,24 @@ | ||
FROM python:3.11-alpine3.16 | ||
|
||
# Set work dir for relative paths. | ||
WORKDIR /app | ||
|
||
# Install dependencies. | ||
COPY ./requirements-dev.txt . | ||
RUN pip install --upgrade pip | ||
RUN pip install -r requirements-dev.txt | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# Copy code from context to image. | ||
COPY . . | ||
RUN apt-get update && apt-get install -y clamav clamav-daemon | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. During Docker build, getting this error: RUN apt-get update && apt-get install -y clamav clamav-daemon /bin/sh: apt-get: not found See comment above, about including clamav modules in the requirements.txt file. |
||
|
||
|
||
COPY . /app/. | ||
|
||
|
||
# ... other configurations ... | ||
|
||
CMD sh -c "python manage.py wait_for_db && \ | ||
python manage.py makemigrations && \ | ||
python manage.py migrate && \ | ||
python manage.py loaddata fixtures/superuser.json && \ | ||
python manage.py loaddata fixtures/status_types.json && \ | ||
python manage.py loaddata fixtures/topics.json && \ | ||
python manage.py populate_db --users 10 --orgs-per-user 1 --groups-per-org 1 --events-per-org 1 --resources-per-entity 1 --faq-entries-per-entity 1 && \ | ||
python manage.py runserver 0.0.0.0:${BACKEND_PORT}" | ||
|
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
The change in the formatting of the values (the "" ) is not necessary.
Usually, the only changes to a .env file should be adding / removing variables. It is best to leave the formatting as-is.
@Joshua-Tihabwangye , could you please revert this file? Thanks!