Skip to content

Feedback#1

Open
github-classroom[bot] wants to merge 160 commits into
feedbackfrom
main
Open

Feedback#1
github-classroom[bot] wants to merge 160 commits into
feedbackfrom
main

Conversation

@github-classroom
Copy link
Copy Markdown
Contributor

@github-classroom github-classroom Bot commented Aug 18, 2025

👋! GitHub Classroom created this pull request as a place for your teacher to leave feedback on your work. It will update automatically. Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.
In this pull request, your teacher can leave comments and feedback on your code. Click the Subscribe button to be notified if that happens.
Click the Files changed or Commits tab to see all of the changes pushed to the default branch since the assignment started. Your teacher can see this too.

Notes for teachers

Use this PR to leave feedback. Here are some tips:

  • Click the Files changed tab to see all of the changes pushed to the default branch since the assignment started. To leave comments on specific lines of code, put your cursor over a line of code and click the blue + (plus sign). To learn more about comments, read “Commenting on a pull request”.
  • Click the Commits tab to see the commits pushed to the default branch. Click a commit to see specific changes.
  • If you turned on autograding, then click the Checks tab to see the results.
  • This page is an overview. It shows commits, line comments, and general comments. You can leave a general comment below.
    For more information about this pull request, read “Leaving assignment feedback in GitHub”.

Subscribed: @annKimani-ICS

github-classroom Bot and others added 25 commits August 18, 2025 12:43
added git cheatsheet link
Includes Colab-exported notebook, requirements.txt, and EDA summary

issue [#29, #30, #31, #32]
feat: add Sprint 1 data cleaning & preprocessing notebook

- Added `sprint1_data_preprocessing.ipynb` (Colab-exported notebook)
- Added `requirements.txt` with pinned dependencies
- Added `eda_summary.md` with dataset overview
- Completed initial data cleaning and preprocessing

Closes #29, #30, #31, #32
Ensures data folder and large files are ignored from version control
chore: update notebook and add .gitignore
Completed first iteration of model training using all available features,
including identifier columns. Achieved near-perfect metrics (AUC=1.0, F1=1.0),
due to overfitting caused by data leakage.Led to memorization of the training data.
Artifacts generated: metrics.json, figures, and config thresholds.

issue [#33, #34, #35, #36]
Dropped identifier columns (Timestamp, Flow ID, IPs, Ports, Unnamed: 0) to reduce
data leakage and improve generalization. Results saved with updated config,
notebook, and evaluation figures.

issue [#33, #34, #35, #36]
Applied SMOTE rebalancing, tuned RF/XGBoost/LightGBM with stratified CV,
added holdout validation, and selected Random Forest (CV=0.8342, Test F1≈0.721).
Saved metrics, figures, and iteration 3 config.

issue [#33, #34, #35, #36]
Optimized training pipeline from 18+ hours to <15 minutes using data sampling
(50K samples), smart feature selection (30 features), and proven defaults.
Achieved 90.51% F1-score with Voting Ensemble, +25.63% improvement over
Iteration 3. Fixed visualization issues and created comprehensive evaluation.

issue [#33, #34, #35, #36]
…board

Built complete admin dashboard as native Ubuntu desktop application with:
- FastAPI backend with JWT + TOTP 2FA (PyOTP + Google Authenticator)
- bcrypt password hashing and rate limiting (5/min)
- PostgreSQL database (users, alerts, models, thresholds, block_rules, audit_logs)
- PyQt5 GUI with login, dashboard, alerts, settings, and user management tabs
- Role-based access control (Admin/Analyst with enforced permissions)
- Real-time KPI cards (alerts 24h, active blocks, precision, threshold)
- Alert management (view, filter, ACK, block IPs with reason)
- Dynamic threshold control (slider 0.00-1.00 with live preview)
- Complete audit logging for compliance
- Automated Ubuntu deployment scripts with systemd service
- Comprehensive documentation (deployment guide, API docs, GUI manual)

Tech stack: Python 3.10+, FastAPI, PostgreSQL, PyQt5, Scikit-learn RF model,
Pandas/Numpy for data processing, Matplotlib for visualization.

Updated .gitignore to exclude large model files (.pkl) from repository.
Model files should be trained locally or distributed separately.

issue [#sprint4-admin-dashboard]
Updated .gitignore to include only essential Iteration 4 model artifacts:
- best_rf_iteration4_voting_ensemble.pkl (main model)
- scaler_iteration4.pkl (feature scaler)
- imputer_iteration4.pkl (missing value imputer)
- label_encoder_iteration3.pkl (label encoder)

Excluded all other model iterations and large files to keep repository lightweight.
When cloning to Ubuntu VM, only Iteration 4 models will be available for deployment.

issue [#sprint4-model-files]
Added .gitkeep file to models/ directory to ensure the directory structure

is preserved in the repository even when it contains only ignored files.

This is a best practice for maintaining directory structure in git.
Added .gitkeep file to models/ directory to ensure the directory structure
is preserved in the repository even when it contains only ignored files.
This is a best practice for maintaining directory structure in git.
Added a new file `add_reports_table.py` to the backend directory to add a new table to the database.
This file is used to add a new table to the database.
…ration

Fixed GitGuardian security issues by removing hardcoded credentials:

- Removed hardcoded passwords from setup_ubuntu_gui.sh
- Replaced SMTP credentials in DEPLOYMENT_GUIDE.md with placeholders
- Updated seed_data.py to generate secure random passwords (12 chars with special chars)
- Added password saving to /tmp/ids_idps_credentials.txt during setup
- Credentials are now generated dynamically and displayed only once

Security improvements:
- No hardcoded passwords in repository
- Random password generation using secrets module
- Credentials saved to secure file during deployment
- Clear warnings about saving credentials securely

This resolves all GitGuardian detected secrets while maintaining functionality.

issue [#security-fix]
@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented Oct 4, 2025

⚠️ GitGuardian has uncovered 6 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
21922405 Triggered Company Email Password d5307ce fix_login_credentials.sh View secret
21465523 Triggered Company Email Password 4f59a13 STEP_BY_STEP_VISUAL_GUIDE.md View secret
21320515 Triggered Generic Password 1db5656 setup_ubuntu_gui.sh View secret
21320516 Triggered SMTP credentials 1db5656 DEPLOYMENT_GUIDE.md View secret
21465524 Triggered Generic Password 4f59a13 verify_setup.sh View secret
21320517 Triggered Company Email Password 1db5656 setup_ubuntu_gui.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

annKimani-ICS and others added 4 commits October 4, 2025 20:16
Fixed additional GitGuardian security issues by removing all hardcoded credentials:

GUI Application:
- Removed hardcoded email placeholders from login forms
- Updated demo credential displays to reference setup output
- Changed placeholder text to generic "Enter your email"

Frontend Application:
- Removed hardcoded email placeholders from login page
- Updated demo credential section to reference generated passwords
- Changed placeholder text to generic "Enter your email"

Backend Setup:
- Removed hardcoded passwords from setup script output
- Updated credential display to reference generated passwords

Documentation:
- Updated README_DESKTOP_GUI.md to remove hardcoded passwords
- Updated DEPLOYMENT_GUIDE.md to reference generated credentials
- Changed all demo scripts to use placeholder text

Security improvements:
- Zero hardcoded credentials in entire codebase
- All passwords generated securely during setup
- Clear instructions to check setup output for actual credentials
- Consistent messaging across all components

This resolves all remaining GitGuardian detected secrets.

issue [#security-fix-complete]
…ed-credentials

security: remove all remaining hardcoded credentials from codebase
- Add setup_gui_complete.sh: Fully automated setup script with 11-step installation
- Add verify_setup.sh: Comprehensive verification script (30+ checks)
- Add fix_common_issues.sh: Automatic troubleshooting and fix script
- Add GUI_SETUP_README.md: Master documentation hub
- Add STEP_BY_STEP_VISUAL_GUIDE.md: Visual walkthrough for first-time setup
- Add QUICK_START.md: Quick command reference card
- Add GUI_SETUP_GUIDE.md: Complete detailed setup and troubleshooting guide
- Add GUI_SETUP_SUMMARY.md: System overview and architecture
- Add GUI_DOCUMENTATION_INDEX.md: Navigation index for all documentation
- Add SETUP_PACKAGE_SUMMARY.txt: Quick reference summary

Fixes:
- Resolves path mismatch issues from setup_ubuntu_gui.sh
- Auto-detects correct project directory
- Eliminates manual configuration requirements
- Includes comprehensive error handling and validation
- Provides multiple troubleshooting resources

Features:
- Automated PostgreSQL setup with proper permissions
- Backend systemd service creation and management
- GUI virtual environment configuration
- Desktop launcher creation
- Credentials auto-generation and secure storage
- Time synchronization for 2FA
- Firewall configuration

This package provides a complete, automated solution for GUI initialization
after Ubuntu VM snapshot restoration with no manual intervention required.
annKimani-ICS and others added 30 commits October 29, 2025 19:48
…ve logging to packet processing and flow analysis - Improved error handling with tracebacks - Reduced duplicate alert window from 60s to 30s - Added diagnostic script for troubleshooting - Fixed API endpoint to properly accept request body - Created comprehensive troubleshooting guide
…fer default-route iface; reduce window to 2s; early burst analyze; add BPF filter 'ip' to sniff() for reliability
…ete, not last admin); add frontend delete action
- Add backend API endpoint for weekly attack trends aggregation
- Implement interactive line chart showing malicious, benign, and total attacks over time
- Add detailed tooltip with attack type breakdown per week
- Position analytics chart above alerts list in dashboard
- Maintain existing alerts table with all action buttons (ACK, Block)
…rmance metrics, and feature importance charts
removed emojis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant