Recent

Author Topic: Protect source code from modification in Lazarus possible?  (Read 836 times)

Willma

  • Newbie
  • Posts: 1
Protect source code from modification in Lazarus possible?
« on: June 27, 2023, 08:56:45 am »
Hello,
unfortunately I haven't found anything relevant about this:
Is there a way directly in Lazarus to protect the source code (i.e. the uncompiled raw source-text) (e.g. in EXCEL-VBA - lock code view with password) or to lock it or protect it against changes (e.g. save code encrypted when saving or save checksums and report in case of unauthorized change)? Or is there another way within Lazarus to protect the source code against unauthorized or unwanted changes? Or how do you do it? It's important to me that I don't get any malicious code slipped in unnoticed and compile and distribute it. It's a bit impractical to always save all the files password-protected and unzip them for editing...

Thank you for any suggestions/hints.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Protect source code from modification in Lazarus possible?
« Reply #1 on: June 27, 2023, 09:15:59 am »
Unfortunate you did not told on what OS you are, since you mentioned excel I assume windows, so create in your %USERPROFILE% a folder for your Lazarus projects, set this folder inside of Lazarus as your default project folder and you should be okay.
If you do not trust the OS administrator, do same steps as above but having data on USB stick or similar external device/target (Cloud?)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Чебурашка

  • Hero Member
  • *****
  • Posts: 568
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: Protect source code from modification in Lazarus possible?
« Reply #2 on: June 27, 2023, 09:23:28 am »
Hello,
unfortunately I haven't found anything relevant about this:
Is there a way directly in Lazarus to protect the source code (i.e. the uncompiled raw source-text) (e.g. in EXCEL-VBA - lock code view with password) or to lock it or protect it against changes (e.g. save code encrypted when saving or save checksums and report in case of unauthorized change)? Or is there another way within Lazarus to protect the source code against unauthorized or unwanted changes? Or how do you do it? It's important to me that I don't get any malicious code slipped in unnoticed and compile and distribute it. It's a bit impractical to always save all the files password-protected and unzip them for editing...

Thank you for any suggestions/hints.

In general a good starting point to "protect" against things is to use a SCM (source control management). In this way you can always control the status of the source code, with respect to a status that you declared correct. Moreover you can always track any further activity on your code, either yours or someone else's. Nowadays one very popular is GIT.
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2007
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Protect source code from modification in Lazarus possible?
« Reply #3 on: June 27, 2023, 09:50:05 am »
[offtopic]
It's called VCS (version control system)
[/offtopic]
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Чебурашка

  • Hero Member
  • *****
  • Posts: 568
  • СЛАВА УКРАЇНІ! / Slava Ukraïni!
Re: Protect source code from modification in Lazarus possible?
« Reply #4 on: June 27, 2023, 10:22:57 am »
[offtopic]
It's called VCS (version control system)
[/offtopic]

https://git-scm.com/

I'd say that the reason why one can also use the SCM achronym is that is not only about versions of software. For example the management of developing branches, merging activities, diffing, blaming, pull req, etc..., are not things that end up to versioning. More in general these things are about managing the entire process of source development, that, among other things includes the tracking of the software versions (releases to users).
FPC 3.2.0/Lazarus 2.0.10+dfsg-4+b2 on Debian 11.5
FPC 3.2.2/Lazarus 2.2.0 on Windows 10 Pro 21H2

 

TinyPortal © 2005-2018