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

fix(backend): Deny public direct access to marketplace-listed graphs #9544

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Feb 28, 2025

In the future, agent creators will be able to specify whether the the graph of their marketplace-listed agent should be publicly accessible (open-source).
Pending this functionality, we want to prevent users from directly accessing graphs that don't belong to them, even if they have a corresponding marketplace listing.

This only prohibits direct read access, not usage of the graph such as running it.

Changes 🏗️

  • Make access control to marketplace-listed graphs "default deny" in backend.data.graph.get_graph(..)
    • Add ignore_ownership_if_listed_in_marketplace=True to get_graph calls where necessary

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • ...
Example test plan
  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

@Pwuts Pwuts requested a review from a team as a code owner February 28, 2025 14:03
@Pwuts Pwuts requested review from kcze and aarushik93 and removed request for a team February 28, 2025 14:03
@github-actions github-actions bot added platform/backend AutoGPT Platform - Back end platform/blocks labels Feb 28, 2025
Copy link

netlify bot commented Feb 28, 2025

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 874280b
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/67c1c89035bfe80008eeffdd

@Pwuts Pwuts requested review from ntindle and majdyz and removed request for kcze and aarushik93 February 28, 2025 14:04
Copy link

deepsource-io bot commented Feb 28, 2025

Here's the code health analysis summary for commits 52ee7d1..874280b. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource Python LogoPython✅ Success
❗ 44 occurences introduced
🎯 37 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Copy link

netlify bot commented Feb 28, 2025

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 874280b
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/67c1c8906337a600088578f7

@ntindle
Copy link
Member

ntindle commented Feb 28, 2025

This feels like the ui for blocking this access should come before the blocking since most of the agents we have are to teach people how to use the platform right?

@Pwuts Pwuts marked this pull request as draft February 28, 2025 14:39
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Feb 28, 2025
@Pwuts
Copy link
Member Author

Pwuts commented Feb 28, 2025

@ntindle I've created #9549 to track the blocking issue, thanks for pointing it out

@Pwuts
Copy link
Member Author

Pwuts commented Mar 3, 2025

Update: for now we'll make all graphs open-source by default, allowing read access to all (published) graphs by all users (ofc still denying write access to anyone other than the owner).

When #9549 is addressed, this PR can be reopened, or the changes included.

@Pwuts Pwuts closed this Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Automatically applied to PRs with merge conflicts platform/backend AutoGPT Platform - Back end platform/blocks size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants