Skip to content
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

Updating name #2

Merged
merged 5 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ RUN pip install --prefix=/install -r /requirement.txt
FROM base
COPY --from=builder /install /usr/local
RUN mkdir -p /app/agent
ENV PYTHONPATH=/app
COPY agent /app/agent
COPY ostorlab.yaml /app/agent/ostorlab.yaml
WORKDIR /app
CMD ["python3", "/app/agent/agent.py"]
CMD ["python3", "/app/agent/virus_total_agent.py"]
File renamed without changes.
2 changes: 1 addition & 1 deletion ostorlab.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: Agent
name: virustotal_agent
name: virustotal
version: 0.0.1
description: Agent responsible for scanning files through the Virus Total public API.
in_selectors:
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ostorlab.agent import definitions as agent_definitions
from ostorlab.runtimes import definitions as runtime_definitions

from agent import agent as virustotal_agent
from agent import virus_total_agent


@pytest.fixture(name='message')
Expand Down Expand Up @@ -42,7 +42,7 @@ def create_virustotal_agent():
bus_exchange_topic='NA',
)

agent = virustotal_agent.VirusTotalAgent(
agent = virus_total_agent.VirusTotalAgent(
definition,
settings,
)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def testVirusTotalAgent_when_virusTotalApiReturnsValidResponse_noRaiseVirusTotal
and finally emits a message of type v3.report.vulnerability with the details above.
"""

def virustotal_valid_response(message): # pylint: disable=W0613
def virustotal_valid_response(message):
"""Method for mocking the Virus Total public API valid response."""
del message
amine3 marked this conversation as resolved.
Show resolved Hide resolved
response = {
'results': {
'scans': {
Expand Down