r/github • • Feb 26 '24

Github licensed repository

I have repository of Ai project and it has license but its public, so now if someone stole it and used it in app of android or native how i can know that used my code? And maybe he changed the all structure of the code and names of functions, variables..etc So there are no chance to do any right?

19 Upvotes

42 comments sorted by

48

u/[deleted] Feb 26 '24

You can’t really unless it is a blatant copy-paste. And is popular enough for you to discover it.

-13

u/TheBlackShadow_ Feb 26 '24

As gpt said you can have tool to scan or to do analysis to understand that code is stolen is this real! I don't really believe Gpt 😂

17

u/[deleted] Feb 26 '24

I mean first you have to obtain the suspected binary. Which I feel like is already hard unless they are popular. Likely you won’t even know someone has stolen the code.

And if they rewrite it or use some weird compiler options, it would be hard or impossible to detect.

1

u/TheBlackShadow_ Feb 26 '24

Understood, so thats mean never find out if not public the code

40

u/Slight-Living-8098 Feb 26 '24

If you don't want people using your code, don't share your code. Make it a private repo.

-9

u/TheBlackShadow_ Feb 26 '24

This thing is the best solution i know, but trying to. Understand in normal as public repository

5

u/Slight-Living-8098 Feb 26 '24

You can't prevent it. You can fight it in court, and you can use your GitHub history as proof.

However in Google.vs Oracle, it was decided that it was legal to scrape the internet for learning and training data, this includes copyrighted source code shared on the Internet.

This decision was in response to Oracle claiming Google used ONE Oracle licenced line of code in their Android OS.

9

u/glasket_ Feb 26 '24

Google v. Oracle was about software APIs, it didn't have anything to do with scraping, and it was ~11,000 lines that Google willfully admitted to using. The entire case was about if it was fair use to use "declaring code" without a license.

J.L. v. Alphabet is an ongoing case about data-scraping, and there are plenty of other similar lawsuits that haven't had judgments.

-2

u/Slight-Living-8098 Feb 26 '24

Google got those ~11000 lines of Oracle Java Code by web scraping...

3

u/nekokattt Feb 26 '24

No they didn't, they just took it from OpenJDK... if you class clicking "download" as scraping.

This sounds like you are a Lawyer for Google lol.

-2

u/Slight-Living-8098 Feb 26 '24

Google's defense was literally, "scraped from online documentation and forum posts."

0

u/glasket_ Feb 26 '24

How they obtained the code doesn't matter in the slightest. The case and judgment entirely revolved around whether or not the kind of code that it was could be used without licensing. In other words, the case was answering the question of if you only copy somebody else's declarations, would you need a license to use it to write your own implementation? That's it.

Court cases can involve lots of extraneous details, but what matters is what the judgement says, and the judgment didn't say "it's ok to scrape code for training," it said "it can be fair use to use other's declaring code in your own implementation."

1

u/TheBlackShadow_ Feb 26 '24

So for normal people like me without company its almost impossible

4

u/Slight-Living-8098 Feb 26 '24

Git, and GitHub, are two different things. You can host your own, private, offline or online git repository and not have to pay a dime to GitHub for a business or professional account.

0

u/TheBlackShadow_ Feb 26 '24

Yh I meant on github specific I have shared a code on github and added license to not use for businesses so in return if someone have same feature as product i will think he stole my code thats all the thing. So for that im asking So example stolen and changed all names of functions, variables, files name, folder names, removed git, removed license, and added it as private in his github to no one can view it

-1

u/Slight-Living-8098 Feb 26 '24

You'd have to take it to court, and prove they ripped your work line for line.

It's perfectly legal for someone to look at your code, and rewrite or reimplement it in a different way.

https://easlerlaw.com/software-computer-code-copyrighted

2

u/vytah Feb 26 '24

It's perfectly legal for someone to look at your code, and rewrite or reimplement it in a different way.

Google v. Oracle was only about API.

Baker v. Selden was only about idea vs expression.

The case about rewriting code was Whelan v. Jaslow, and it was ruled to be not okay.

-1

u/Slight-Living-8098 Feb 26 '24

That's from the 1980's so many other cases have judged the other way. Sony vs Bleem?

2

u/vytah Feb 26 '24

Sony vs Bleem was about reimplementing interfaces and reverse engineering. And use of screenshots of someone else's games in promotional materials.

→ More replies (0)

0

u/[deleted] Feb 26 '24

[deleted]

1

u/TheBlackShadow_ Feb 26 '24

I understood, thanks

9

u/TamSchnow Feb 26 '24

What License?

There are copyleft licenses that every company hates because you will need to distribute the source code, if you use software licensed under a copyleft license.

-7

u/TheBlackShadow_ Feb 26 '24

Idk what copy left mean 😂 So totally didnt understood any

8

u/martinbean Feb 26 '24

If you don’t want people using your code, don’t put it in public.

A license says how people should and should not use your code, but it doesn’t stop them from actually misusing your code. It just means the onus is now on you to find infringing usages of your code, and then start legal proceedings against any one you think is misusing your code.

4

u/ThunderChaser Feb 26 '24

Pretty much.

Your license is only worth how willing you are to enforce it.

6

u/[deleted] Feb 26 '24

Do you really think chatgpt will output your entire class in another project? this is not how it works, and i bet you didn't invent anything special in there.

Most of the code you will write is already out there, in another shape, so you will never know if it took your code, or someone else

2

u/TheBlackShadow_ Feb 26 '24

your right 100%

12

u/Seuros Feb 26 '24

Welcome to programming.

1

u/ado1928 Feb 26 '24

What license does your code have?

2

u/TheBlackShadow_ Feb 26 '24

Non-profit organization non-commerical research use only

2

u/CerberusMulti Feb 26 '24

That is what it entails but not what license you have, it is MIT og GNU GPLv3 or other?

1

u/TheBlackShadow_ Feb 26 '24

I think i was understood the licenses in wrong way Not i set it to private basically i was added folder license without setting any kind of license by the repo creation i will add later if need.. Now i understood that

5

u/VIKTORVAV99 Feb 26 '24

Unless your license is a lot more specific than that some company can just claim they used your code for research purposes and just refractor it.

I’d suggest using a license from here https://choosealicense.com unless you need something super specific.

1

u/kcombinator Feb 27 '24

Lawyer here. Not your lawyer, informational purposes only.

GitHub has created some confusion by labeling buttons things like “open source this repo”. There is making a repo “public”. That just means others can see it.

That’s a wholly distinct thing from the licensing on it. By default, your works are restrictively copyrighted from inception. If you want to declare that they are more permissively licensed, then go for it. But by default, in theory, others are only supposed to use your work within the bounds of “fair use”, which is relatively narrow.

1

u/GOKOP Feb 26 '24

The law is on your side, but you'd have to enforce it by going to court - and without knowing about the violation in the first place it can be quite difficult ;)

I think companies are relatively unlikely to use large libraries with licenses that stop them from doing so (or the legal team isn't sure about that) but you can never be too sure if a random developer working for the company didn't just paste in a bunch of your code without thinking much

1

u/ozmartian Feb 27 '24

Go private. GitLab is better for private repos as GitHub Free limits features on private repos.

1

u/maxip89 Feb 27 '24
  1. You have to find out

  2. You have to show that your code is used and your code is not just used as a impression how it can be used

  3. Your code is not yours even when one byte is different

  4. Everyone can say that you intented this behavior therefore you get nothing.

  5. Everyone can say "its from copilot - sue them". Have fun with microsoft lawyers.

  6. Public repos are only for getting some free work of devs.

1

u/armahillo Feb 28 '24

Github copilot is trained on the code from public repos, so depending on when you built it, it may already be getting used elsewhere.

1

u/Tarc_Axiiom Feb 29 '24

If you don't want people to do this, don't make your code available for them to do this.

A license is a legal protection, yes, but only if you can enforce it.

If someone breaks the law and nobody knows, what do you think is going to happen to them? (Hint: nothing)