Obfuscation

175 views
Skip to first unread message

Colin Wood

unread,
Aug 27, 2024, 8:10:09 AM8/27/24
to Google Apps Script Community

I have made and intend to sell some Google slides with apps script. I’d like to obfuscate the code to prevent casual access by my users. Each of the obfuscation tools I’ve tried triggers Google to issue an unrecognised code warning with a scary red triangle when users authorise the file. Authorisation using the un-obfuscated code merely triggers the routine warning stating the scope is limited to just that particular file.

I could be mistaken, but I’m sure I’ve used an obfuscator in the past which did not have this effect.

So I’m looking for suggestions for an obfuscator tool that does not trigger the extra warning. Perhaps one that has a list of options I can choose to apply or not apply. Any suggestions?

P.S. I’m aware that I could hide the code by using an external library but since my target audience will be lots of teachers, each distributing to lots of students, I fear this would slow the code considerably. I’m also aware that I could hide my code by creating addons but I’m unfamiliar with this and fear it would create extra work I’d rather avoid - it would also make it less user friendly by adding extra instructions the pupils would need to follow to install the addon.

Keith Andersen

unread,
Aug 27, 2024, 10:30:17 AM8/27/24
to google-apps-sc...@googlegroups.com

Couple things to consider...

1 I would never purchase or use code I could not see plainly. It's the only way I can assure no malicious code. Schools in particular might prohibit use of such a product. Transparency = trust.

2 you stated you want to do so to "prevent casual access". They will still have casual access. They can still do harm. If you're trying to keep it proprietary, that's a whole different scenario.

Which obfuscator(s) are you using or have tried?



My website: https://sites.google.com/view/klaweb/
Passions: God, Family, Scriptures, Learning, Data Management, Google Sheets + App Script and much more!

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ee5a10ce-9b45-4f11-8395-bb69fe6f4646n%40googlegroups.com.

Rubén Rivera (Wicket)

unread,
Aug 27, 2024, 3:03:09 PM8/27/24
to Google Apps Script Community
Consider creating an Editor add-on. You could distribute your presentations with an add-on enabled.

A Google Apps Script library will not hide the code as it should be shared to make it usable. 

I have never tried using a code obfuscator, but I don't think it would be a good idea to do so with Google Apps Script.



Martin Molloy

unread,
Aug 28, 2024, 3:41:51 AM8/28/24
to google-apps-sc...@googlegroups.com
Publishing your script as an add-on isn't that much extra work. The main issue is making sure that the scopes you request are not so broad that they fall foul of Google's verification rules.

The part that I find the greatest pain in that is creating the logo in the various sizes that Google demands. I use Slides for that, saved in a variety of custom sizes, to meet the spec.

It's also less of a hassle for the teachers and students if the school Google Admin installs the add on for the domain it's just a case of the teacher showing the students how to select it from the menu.

If you want some help with publishing your script as an add on drop me an email


Martin

--

fl

unread,
Aug 28, 2024, 3:41:52 AM8/28/24
to Google Apps Script Community
1) Could you show the two warnings?

Doesn't "double library" hide the code?

Reply all
Reply to author
Forward
0 new messages