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

allow _daemon_ user to run sudo #46

Merged
merged 12 commits into from
May 15, 2024
Merged

allow _daemon_ user to run sudo #46

merged 12 commits into from
May 15, 2024

Conversation

Thanhphan1147
Copy link
Collaborator

@Thanhphan1147 Thanhphan1147 commented May 13, 2024

Allow the _daemon_ user to run sudo without a password, used to allow agents to install packages depending on the use-case.

Checklist

@Thanhphan1147 Thanhphan1147 added the trivial This is a trivial PR label May 13, 2024
@Thanhphan1147 Thanhphan1147 requested a review from a team as a code owner May 13, 2024 12:26
arturo-seijas
arturo-seijas previously approved these changes May 13, 2024
arturo-seijas
arturo-seijas previously approved these changes May 13, 2024
yanksyoon
yanksyoon previously approved these changes May 13, 2024
Copy link
Collaborator

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

LGTM! Could we include a small test to run sudo workflow?

@Thanhphan1147 Thanhphan1147 dismissed stale reviews from yanksyoon and arturo-seijas via d44be82 May 13, 2024 12:51
arturo-seijas
arturo-seijas previously approved these changes May 13, 2024
.trivyignore Outdated Show resolved Hide resolved
arturo-seijas
arturo-seijas previously approved these changes May 13, 2024
@Thanhphan1147 Thanhphan1147 requested a review from yanksyoon May 13, 2024 14:11
yanksyoon
yanksyoon previously approved these changes May 13, 2024
yanksyoon
yanksyoon previously approved these changes May 14, 2024
@Thanhphan1147
Copy link
Collaborator Author

LGTM! Could we include a small test to run sudo workflow?

Good idea! Will include that in.

@Thanhphan1147
Copy link
Collaborator Author

Added an integration test for the sudo!

@Thanhphan1147 Thanhphan1147 requested a review from yanksyoon May 15, 2024 10:20
Copy link
Contributor

Test coverage for e5c90c4

Name              Stmts   Miss Branch BrPart  Cover   Missing
-------------------------------------------------------------
src/agent.py         61      0     12      0   100%
src/charm.py         58      0     10      0   100%
src/metadata.py       9      0      0      0   100%
src/pebble.py        24      0      0      0   100%
src/server.py        51      0     12      0   100%
src/state.py         67      0     12      0   100%
-------------------------------------------------------------
TOTAL               270      0     46      0   100%

Static code analysis report

Run started:2024-05-15 10:29:48.995943

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 1667
  Total lines skipped (#nosec): 1
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@Thanhphan1147 Thanhphan1147 merged commit 94e8d41 into main May 15, 2024
17 checks passed
@Thanhphan1147 Thanhphan1147 deleted the agent_apt_install branch May 15, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trivial This is a trivial PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants