Skip to content

Remove sudo access to agent shell - #190

Merged
Bala (0xba1a) merged 2 commits into
mainfrom
bala/no_sudo_for_agent
Sep 28, 2026
Merged

Bala (0xba1a) merged 2 commits into
mainfrom
bala/no_sudo_for_agent

Conversation

@0xba1a

Copy link
Copy Markdown
Member

No description provided.

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.73%. Comparing base (713b551) to head (c6fd492).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
+ Coverage   68.52%   70.73%   +2.21%     
==========================================
  Files          44       44              
  Lines        2821     2867      +46     
==========================================
+ Hits         1933     2028      +95     
+ Misses        888      839      -49     
Flag Coverage Δ
ghcp 31.07% <20.58%> (-0.09%) ⬇️
integration 40.59% <45.58%> (+0.08%) ⬆️
ollama_local 32.85% <45.58%> (+0.06%) ⬆️
slow-browser 17.43% <8.82%> (-0.08%) ⬇️
slow-other 38.64% <44.11%> (-0.03%) ⬇️
unit 66.82% <100.00%> (+3.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/microbots/bot/CopilotBot.py 100.00% <100.00%> (ø)
src/microbots/environment/Environment.py 100.00% <100.00%> (ø)
...environment/local_docker/LocalDockerEnvironment.py 85.40% <100.00%> (+3.16%) ⬆️
...nt/local_docker/image_builder/ShellCommunicator.py 14.07% <100.00%> (+14.07%) ⬆️
...ironment/local_docker/image_builder/dockerShell.py 95.34% <100.00%> (+95.34%) ⬆️
src/microbots/tools/internal_tool.py 97.64% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@0xba1a

Copy link
Copy Markdown
Member Author

Codecov Report

❌ Patch coverage is 54.41176% with 31 lines in your changes missing coverage. Please review. ✅ Project coverage is 68.01%. Comparing base (713b551) to head (e595de8).

Files with missing lines Patch % Lines
...ironment/local_docker/image_builder/dockerShell.py 0.00% 25 Missing ⚠️
...environment/local_docker/LocalDockerEnvironment.py 87.87% 4 Missing ⚠️
src/microbots/environment/Environment.py 50.00% 1 Missing ⚠️
...nt/local_docker/image_builder/ShellCommunicator.py 0.00% 1 Missing ⚠️
Additional details and impacted files
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
- Coverage   68.52%   68.01%   -0.51%     
==========================================
  Files          44       44              
  Lines        2821     2867      +46     
==========================================
+ Hits         1933     1950      +17     
- Misses        888      917      +29     

Flag Coverage Δ
ghcp 31.07% <20.58%> (-0.09%) ⬇️
integration 40.59% <45.58%> (+0.08%) ⬆️
ollama_local 32.85% <45.58%> (+0.06%) ⬆️
slow-browser 17.43% <8.82%> (-0.08%) ⬇️
slow-other 37.60% <44.11%> (-1.08%) ⬇️
unit 62.81% <19.11%> (-0.82%) ⬇️
Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/microbots/bot/CopilotBot.py 100.00% <100.00%> (ø)
src/microbots/tools/internal_tool.py 97.64% <100.00%> (ø)
src/microbots/environment/Environment.py 92.85% <50.00%> (-7.15%) ⬇️
...nt/local_docker/image_builder/ShellCommunicator.py 0.00% <0.00%> (ø)
...environment/local_docker/LocalDockerEnvironment.py 82.40% <87.87%> (+0.16%) ⬆️
...ironment/local_docker/image_builder/dockerShell.py 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:

Copilot Add or modify test cases to increase the patch coverage to 100%

Co-authored-by: 0xba1a <2942888+0xba1a@users.noreply.github.com>

Copilot AI commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

[Codecov](https://app.codecov.io/gh/microsoft/microbots/pull/190?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microso...

Added targeted regression tests in c6fd492. Local pytest-cov results show 100% patch coverage (68/68 changed executable lines) against the PR base. Full unit selection: 639 passed, 1 skipped. Production code and coverage settings are unchanged.

if check_result.return_code != 0:
logger.debug("📁 Creating destination directory inside container: %s", dest_dir)
mkdir_cmd = f"mkdir -p {shlex.quote(dest_dir)}"
mkdir_result = self.execute(mkdir_cmd)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be good to add a comment saying the dest_path shouldn't be root owned path, or change this to execute_privileged.

@0xba1a
Bala (0xba1a) merged commit 7679c96 into main Sep 28, 2026
10 checks passed
@KavyaSree2610
Kavya Sree Kaitepalli (KavyaSree2610) deleted the bala/no_sudo_for_agent branch September 28, 2026 15:40
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.

4 participants