mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-01 23:32:39 +00:00
feat: add useforsecurty false for bandit pipeline
This commit is contained in:
2
.github/workflows/security-checker.yml
vendored
2
.github/workflows/security-checker.yml
vendored
@@ -19,4 +19,4 @@ jobs:
|
|||||||
run: pip install bandit
|
run: pip install bandit
|
||||||
|
|
||||||
- name: Run Bandit
|
- name: Run Bandit
|
||||||
run: bandit -r src/
|
run: bandit -c pyproject.toml -r src
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ ignore_missing_imports = true
|
|||||||
disable_error_code = 'import-untyped'
|
disable_error_code = 'import-untyped'
|
||||||
exclude = ["cli/templates"]
|
exclude = ["cli/templates"]
|
||||||
|
|
||||||
|
[tool.bandit]
|
||||||
|
exclude_dirs = ["src/crewai/cli/templates"]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ class BaseAgent(ABC, BaseModel):
|
|||||||
@property
|
@property
|
||||||
def key(self):
|
def key(self):
|
||||||
source = [self.role, self.goal, self.backstory]
|
source = [self.role, self.goal, self.backstory]
|
||||||
return md5("|".join(source).encode()).hexdigest()
|
return md5("|".join(source).encode(), usedforsecurity=False).hexdigest()
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def execute_task(
|
def execute_task(
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ class Crew(BaseModel):
|
|||||||
source = [agent.key for agent in self.agents] + [
|
source = [agent.key for agent in self.agents] + [
|
||||||
task.key for task in self.tasks
|
task.key for task in self.tasks
|
||||||
]
|
]
|
||||||
return md5("|".join(source).encode()).hexdigest()
|
return md5("|".join(source).encode(), usedforsecurity=False).hexdigest()
|
||||||
|
|
||||||
def _setup_from_config(self):
|
def _setup_from_config(self):
|
||||||
assert self.config is not None, "Config should not be None."
|
assert self.config is not None, "Config should not be None."
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ class Task(BaseModel):
|
|||||||
expected_output = self._original_expected_output or self.expected_output
|
expected_output = self._original_expected_output or self.expected_output
|
||||||
source = [description, expected_output]
|
source = [description, expected_output]
|
||||||
|
|
||||||
return md5("|".join(source).encode()).hexdigest()
|
return md5("|".join(source).encode(), usedforsecurity=False).hexdigest()
|
||||||
|
|
||||||
def execute_async(
|
def execute_async(
|
||||||
self,
|
self,
|
||||||
|
|||||||
Reference in New Issue
Block a user