Skip to content

Commit

Permalink
[MRG] Merge pull request #401 from dfir-iris/unnecessary_shebangs
Browse files Browse the repository at this point in the history
[DEL] unnecessary shebang in non-executable python files
  • Loading branch information
whikernel authored Feb 7, 2024
2 parents 91ec1fd + 4dd7452 commit 59bdd62
Show file tree
Hide file tree
Showing 113 changed files with 41 additions and 276 deletions.
9 changes: 8 additions & 1 deletion CODESTYLE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Coding style

If you wish to develop in DFIR-IRIS, please make sure to read the following tips.
If you wish to develop in DFIR-IRIS, please make sure to read the following tips.

## Python coding rules

* do not prefix files with any shebang, such as:
```python
#!/usr/bin/env python3
```

## Commits
Try to follow the repository convention :
Expand Down
2 changes: 0 additions & 2 deletions scripts/gunicorn-cfg.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
3 changes: 0 additions & 3 deletions source/app/blueprints/activities/activities_routes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python3
#
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/alerts/alerts_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2023 - DFIR-IRIS
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/api/api_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
8 changes: 0 additions & 8 deletions source/app/blueprints/case/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand All @@ -17,9 +15,3 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# IMPORTS ------------------------------------------------

# VARS ---------------------------------------------------

# CONTENT ------------------------------------------------
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_assets_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
4 changes: 1 addition & 3 deletions source/app/blueprints/case/case_comments.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# DFIR-IRIS Team
# [email protected]
Expand Down Expand Up @@ -56,4 +54,4 @@ def case_comment_update(comment_id, object_type, caseid):
return response_success("Comment edited", data=comment_schema.dump(comment))

except marshmallow.exceptions.ValidationError as e:
return response_error(msg="Data error", data=e.normalized_messages(), status=400)
return response_error(msg="Data error", data=e.normalized_messages(), status=400)
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_graphs_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_ioc_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_notes_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_rfiles_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
4 changes: 1 addition & 3 deletions source/app/blueprints/case/case_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down Expand Up @@ -453,4 +451,4 @@ def case_review(caseid):

db.session.commit()

return response_success("Case review updated", data=CaseSchema().dump(case))
return response_success("Case review updated", data=CaseSchema().dump(case))
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_tasks_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/case/case_timeline_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS) - DFIR-IRIS Team
# [email protected] - [email protected]
Expand Down
7 changes: 0 additions & 7 deletions source/app/blueprints/context/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand All @@ -18,8 +16,3 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# IMPORTS ------------------------------------------------

# VARS ---------------------------------------------------

# CONTENT ------------------------------------------------
2 changes: 0 additions & 2 deletions source/app/blueprints/context/context.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/dashboard/dashboard_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
3 changes: 0 additions & 3 deletions source/app/blueprints/datastore/datastore_routes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python3
#
#
# IRIS Source Code
# Copyright (C) 2022 - DFIR IRIS Team
# [email protected]
Expand Down
4 changes: 1 addition & 3 deletions source/app/blueprints/demo_landing/demo_landing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down Expand Up @@ -56,4 +54,4 @@ def demo_landing():
iris_version=iris_version,
demo_domain=demo_domain,
demo_users=demo_users
)
)
3 changes: 0 additions & 3 deletions source/app/blueprints/dim_tasks/dim_tasks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python3
#
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/filters/filters_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2023 - DFIR-IRIS
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/login/login_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_access_control.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_alerts_status_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_analysis_status_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_assets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_assets_type_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_attributes_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_case_classifications.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_case_state.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_case_templates_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_cases_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_customers_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_evidence_types_route.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_groups.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_ioc_types_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_modules_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_objects_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
4 changes: 1 addition & 3 deletions source/app/blueprints/manage/manage_severities_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down Expand Up @@ -83,4 +81,4 @@ def search_analysis_status(caseid):

# Serialize the severity and return them in a JSON response
schema = SeveritySchema(many=True)
return response_success("", data=schema.dump(severity))
return response_success("", data=schema.dump(severity))
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_srv_settings_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
4 changes: 1 addition & 3 deletions source/app/blueprints/manage/manage_tags.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# [email protected]
#
Expand Down Expand Up @@ -95,4 +93,4 @@ def manage_tags_suggest(caseid) -> Response:

return app.response_class(response=json.dumps(tags, cls=AlchemyEncoder),
status=200,
mimetype='application/json')
mimetype='application/json')
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_task_status_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_templates_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_tlps_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/manage/manage_users.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/overview/overview_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# DFIR-IRIS Team
# [email protected]
Expand Down
2 changes: 0 additions & 2 deletions source/app/blueprints/profile/profile_routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
Expand Down
27 changes: 16 additions & 11 deletions source/app/blueprints/reports/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#!/usr/bin/env python3
# IRIS Source Code
# Copyright (C) 2021 - Airbus CyberSecurity (SAS)
# [email protected]
#
# This file is part of IRIS Project
# MIT Licence
# Author : PAM
# File creation date : 4/27/20

# IMPORTS ------------------------------------------------

# VARS ---------------------------------------------------

# CONTENT ------------------------------------------------
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Loading

0 comments on commit 59bdd62

Please sign in to comment.