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

Add Security information to README.md #787

Merged
merged 1 commit into from
Feb 11, 2025
Merged

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Feb 11, 2025

Also add information about ramalama.conf to the ramalama.1 man page.

Summary by Sourcery

Documentation:

  • Document security measures in README.md and ramalama.1 man page.

Copy link
Contributor

sourcery-ai bot commented Feb 11, 2025

Reviewer's Guide by Sourcery

This pull request enhances the documentation by adding a comprehensive SECURITY section to both the README and the man page (docs/ramalama.1.md). The added sections explain how RamaLama uses container-based isolation, read-only volume mounts, network restrictions, auto-cleanup, and Linux capabilities restrictions to secure AI model execution. Additionally, details about the ramalama.conf configuration file usage and precedence are now included.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Introducing a detailed SECURITY section in the man page documentation.
  • Added security guidelines that explain container isolation, read-only volume mounts, no network access, auto-cleanup, and Linux capabilities drop.
  • Included information regarding the ramalama.conf configuration files, explaining the default paths and override mechanics.
docs/ramalama.1.md
Adding a comprehensive SECURITY section in the README documentation.
  • Inserted information on how container execution of AI models enhances security through isolation and restricted privileges.
  • Outlined key security measures including read-only mounts, no network access, container auto-cleanup, and dropping of Linux capabilities.
  • Reorganized the document structure to lead into TRANSPORTS after detailing the security features.
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Also add information about ramalama.conf to the ramalama.1 man page.

Signed-off-by: Daniel J Walsh <[email protected]>

### Test and run your models more securely

Because RamaLama defaults to running AI models inside of rootless containers using Podman on Docker. These containers isolate the AI models from information on the underlying host. With RamaLama containers, the AI model is mounted as a volume into the container in read/only mode. This results in the process running the model, llama.cpp or vLLM, being isolated from the host. In addition, since `ramalama run` uses the --network=none option, the container can not reach the network and leak any information out of the system. Finally, containers are run with --rm options which means that any content written during the running of the container is wiped out when the application exits.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"read/only" typo, can catch typos in follow on PRs though


### Test and run your models more securely

Because RamaLama defaults to running AI models inside of rootless containers using Podman on Docker. These containers isolate the AI models from information on the underlying host. With RamaLama containers, the AI model is mounted as a volume into the container in read/only mode. This results in the process running the model, llama.cpp or vLLM, being isolated from the host. In addition, since `ramalama run` uses the --network=none option, the container can not reach the network and leak any information out of the system. Finally, containers are run with --rm options which means that any content written during the running of the container is wiped out when the application exits.
Copy link
Collaborator

Choose a reason for hiding this comment

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

read/only typo again

Copy link
Member Author

Choose a reason for hiding this comment

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

What is the typo?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wrong, sorry.

I'd never seen read/only written with a slash before, it's just a way of writing it I'm unaware of, used to seeing:

read-only or readonly

I have seen r/o before though once or twice 😄

@ericcurtin ericcurtin merged commit 7a1cf12 into containers:main Feb 11, 2025
8 checks passed
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.

2 participants