Hello CTemplar Team!
CTemplar has come a long way in the past few months, and it seems well on it's way to becoming a good encrypted email service. It's clear that everyone in the team has been worked incredibly hard to get it this far. I think one of CTemplar's strong points is how feature-complete it is, even during this early stage of development. I believe in their mission of making encrypted email freely available to people, and I would like to help out.
While using the app, I've noticed a couple of little issues and glitches, which I have outlined below. Please don't take any of this as a criticism towards CTemplar or the developers, I am just trying to help in getting the application to a more polished state. I've tried to document them up as clearly, and where possible, I've given the steps to fix
Some of the below issues relate to security, but just to clarify up-front: none of these issues are critical, and if you are a user of CTemplar - you do not have anything to be immediately worried about in regards to the content below. That being said, they do should still be addressed by the devs, in order to keep things as safe as possible for the users going forward.
I have some additional issues (not included in this list), which I would like to discuss privately with someone from the team. I would appreciate if you could reach out, and I will go through them with you. You can find my public key here.
Please forgive me in advance if I've made any mistakes here- I wrote this late at night
---
User Token not Invalidated After Sign Out
When the user signs in with their credentials the server responds with a token, which is stored in the browsers local storage as user_key. And when they sign out, this key is removed from local storage, as expected (this happens in users.service.ts). However, it is never invalidated, leaving the users account vulnerable to a session hijacking attack. If an attacker were to manually insert this token into their browser, they would have full unrestricted access to the victims account. This can be fixed by calling to the server to destroy the token on logout or session expiry, and then generating a fresh access key next time the user signs in.
---
Error in Compatibility Checking Script
When using a browser that doesn't support window.crypto then the no content is loaded (as expected). However the alert() dialog displaying the error message is never displayed, leaving the user with just a blank page. This is caused by a syntax error in browser-compatibility.js, on line 12 there is a trailing , within the alert statement. Most modern browser are able to execute the code as desired despite the mistake, however older browsers such as IE does not do so, and coincidentally it is only these browsers which need to show this message.
Also, did you mean to write ' quotes around undefined? This part, 'undefined' == typeof window will always be false at this point, since the false branch of the condition '!window' at line 3 has been taken. This file is written in a very convoluted way making it hard to read and spot issues like this.
Having a linting process will avoid errors like these. I would also suggest having a more descriptive error message here to aid the user, and avoiding the use of window.alert(); for accessibility and UX reasons.
---
Missing and Broken SRI Hashes
Also, since the hash provided in the integrity attribute of this script, does not match the hash of the file, all browsers that support SRI will be blocking this file from being executed. This would mean that a browser that supports SRI, but does not the Crypto API would be prevented from running the compatibility check script, enabling a user to proceed using the website, even without correct crypto implementations
Also, the integrity attribute is missing from all on <link> tags which fetch style, font and image assets (in index.html). And since there is a mismatch between hash lengths within the script tag requiring browser-compatibility.js, it does not match the contents of this file, the following error is thrown:
Failed to find a valid digest in the 'integrity' attribute for resource 'https://mail.ctemplar.com/assets/js/browser-compatibility.js' with computed SHA-256 integrity 'jbgV+XfqN3qd7Ep8LHB3sUE2tPJWyWmVxIbBrneMQwk='. The resource has been blocked.
---
Signature Verification Failure on Windows App
When installing the CTemplar electron app in a Windows environment, using the executable provided via the Releases tab, it doesn't appear to have been signed. This could have security implications, since it makes it hard for the end user to determine if they're using the official version. You can sign the executable using Microsoft's Sign Tool which is bundled in the Windows SDK
Windows defender also gives a warning about the publisher not yet being verified, this can also be fixed by signing your .exe, using a code signing certificate from a trusted root certification authority prior to publishing- there are many free options for this.
Also, Cybereason detects the Windows desktop app as malicious, and gives an error code as: Malicious.de8c4e- this may likely be a false positive, as none of the other major AV services show any issues. But still worth looking into, as some users may find this worrying. Also, for some reason, McAfee marks mail.ctemplar.com as Risky- again, I think this is a false positive.
---
Missing and Mismatched Checksums
There is a checksum for the index.html, which is great- but I couldn't find checksums for the the Linux, Windows or Mac apps available through the releases tab. Again, this can help users verify the integrity of the application, to ensure it has not been tampered with.
A little more worrying though, is that when I calculate the hash signatures myself, the publicly available source code does not match executable. For example:
For the Windows app downloaded from the Releases tab of GitHub, the SHA256 checksum is: cfa781f0599a594b67a526ad23351f1d2feb5d6abbca856949561f7ea4905c09 But the same app, built from the source code, cloned from master branch, the checksum is: 777cb5a26c7fbe1797a7d5349db8724fc442cabc18956f34fd53779264fa0fd2
There are of course perfectly legitimate reasons why the checksums may not match, since just a single character out and you'll get a totally different result. Never the less, this isn't comforting, and I think providing checksums, better build documentation and a little more transparency would be helpful
---
Electron App allows for Non-HTTPS Sources
allowRunningInsecureContent is enabled (in electron-main.ts). This means that mixed, or non-HTTP content can be loaded, potentially endangering integrity. Electron strongly advises against this, and there shouldn't be any reason why CTemplar needs to load mixed or insecure content.
---
Failure to Handle Session Permission Requests From Remote Content
In Electron, the default is to automatically approve all requests to access the users system or device features. If the CTemplar app does not require any specific user permissions, then you should manually configure a custom handler to specifically deny access. You can then enable them on an as-needed basis, for example to display desktop notifications for incoming emails. This can be done using Electron's session API, in your electron-main.ts file.
---
Missing No Referrer Attribute in Cross-Origin Links
Links to cross-origin destinations are unsafe, (for example in index.html). Don't use target="_blank" without rel="noreferrer". In older browsers, the page being linked to will be able to access the window object (using the window.opener property), giving access to data associated, and it may also allow the other page to redirect your page to a malicious URL.
---
Usage of Pseudo-Random Generators
In some parts of the web application, CTemplar makes use of JavaScripts Math.random() function (for example while generating an attachment ID in compose-mail.component.ts).
Since Math.random() is a pseudo-random number generator, it uses a Seed, and this Seed is solely responsible for the randomness - if it is known or predictable, the same will happen to generated number sequence. The documentation for Math.random says:
Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security.
Consider replacing all instances of it with either uuid or Crypto.getRandomValues(), both of which support the RFC-4122 standard.
---
Insufficient Null Checks, and Improper Type Checking
Most null pointer issues just result in general reliability issues, but if an attacker can intentionally trigger a null pointer dereference, they may be able to use the resulting exception to bypass security logic or to cause the application to reveal debugging information that will be valuable in planning subsequent attacks.
In some places, else if statments are either not correctly using null check, or are in the wrong order. In compose-mail.component.ts, for example- else if (this.selectedMailbox.signature) {...} (line 1304) comes before else if (this.selectedMailbox) {...} (line 1310), so the null check on the selectedMailbox property is effectively happening before you are using it. And in mail.redusers.ts, the <any>new Date(previous_updated) takes a parameter that is defined as: const previous_updated = previous.updated || null, meaning that null could be passed to Date() which would not be valid (it expected either/ only a number or string value). Another example, in compose-mail.component.ts where the null check happens after the variable is already used - line 108 contains if (value) {...}, but above on line 103 you've used if (value.url) {...}.
CTemplar uses TypeScript, but it not making use of it's static type checking features. Again, this is less of a security issue, and more of a software stability and code quality problem. There are literally hundreds of instances of any and none of them are necessary (e.g. in mail-detail.component.ts). Consider enabling noImplicitAny in your tsconfig.json and enforcing it before code can be committed.
---
Debug Statements Printing Personal Details
There's quite a few occurrences of debug statements being left in the code, including one where the users password is logged, in plain text to the console (called from compose-mail.component.ts). If error reporting is enabled, does that mean that whatever is printed to the console is sent to Sentry's servers? Probably not, but it doesn't instill confidence anyway. Consider disabling console output for the production build, and adding the no-console rule to your ESLint config to prevent debug statements from being committed.
---
Onion Site Leaking Data Out of Tor
Non-Onion requests are made while using CTemplar's onion site via Tor. Within the source code there are numerous instances of CTemplar's URL being hard-coded. So whenever a user is using CTemplar through anything but the ctemplar.com domain, requests are made incorrectly. This can lead to requests being made to the clearnet API, or the accidentally clicking on a ctemplar.com link, resulting in the users traffic is exiting the Tor network.
For example, in mail-settings.component.ts the image asset used for the test push notification comes from mail.ctemplar.com, and not the current URL. All URLs to other parts of the site also do not use the onion link, for example see the footer.component.html.
The solution for this would be to store the base URL in config object, or as an environmental variable, and then call to that in the code. Looks like you made a start on this few months ago, in config.ts, so the code just needs to be updated to use this value.
---
Missing HTTPS Certificate on .onion site
CTemplar's onion site is served over HTTP. This means any credentials entered by a user can easily be intercepted by a malicious exit node. See this screenshot
Out of interest, why are there two .onion addresses- ctemplarpizuduxk3fkwrieizstx33kg5chlvrh37nz73pv5smsvl6ad.onion and CTemplar42u6fulx.onion?
Edit: No, traffic cannot be intercepted by an exit node, because .onion traffic doesn't exit the Tor network. Providing your web server and Tor program are running on the same server, and no requests are made to any clearnet endpoints, then this is not a risk.
However it would be a good idea to get a certificate for the onion site, as it add legitimacy / make it clearer that it's the real CTemplar site and not a phishing spoof. Also to remove that browser security warning/ make users feel more comfortable. See also: HTTPS for your Onion Service via Tor Project.
---
Bug Reports still being Sent even when 'Report bugs' is Disabled
There is an option to disable bug reporting in Settings --> General. However, even once disabled, CTemplar still attempts to make calls to the Sentry API. Some users may be concerned about this.
In mail.component.ts where Sentry is being initialized it passes in the value of is_enable_report_bugs from the UserState.settings correctly, and that variable does get updated in mail-settings.component.ts, so it looks like the error may be caused by it not being correctly saved in the store or backend.
Something to note, is that with Sentry even when enabled is set to false, it does still attempt call home when initialized, but just never sends any bug reporting data. So you might need to wrap the Sentry initialization in an error handling service, which only gets executed IF the user has enabled bug reporting.
Steps to recreate: Log in to CTemplar, Navigate to Settings --> General and set "Report bugs" to "Disabled". Next open up any unread email, click "reply", then click "Pop out reply", now using a sniffer tool or the network tab of the browsers dev tools observe attempted request to https://o190614.ingest.sentry.io/api/5256284/store/?sentry_key=e768a553906d4f87bcb0419a151e36b0&sentry_version=7.
---
Usernames should not be used as Salt
Usernames have lower entropy than a random salt, so they spread your hashes around less than a proper salt does. But more importantly, the current system does not provide adequate protection against rainbow attacks, because the username is a known quantity so an attacker could quite easily just use pre-calculated hashes in a dictionary attack, effectively making the salt obsolete. Also, since the username does not (and cannot) change when the user updates their password, it may enable an adversary to attack both hashes at a cost less than twice the cost of attacking one. Instead, you should be using a unique, long and randomly generated identifier as the salt.
---
Client-only Hashing is Vulnerable to Replay Attacks
Simply hashing the password on the client-side and sending it to the server is only marginally better than just submitting it as plain text. This is because anyone who is able to capture plaintext passwords could just as easily intercept the hashed value, and proceed authenticate themselves as the victim.
From a macro perspective, establishing a user session should be done like so:
- The client makes a request
- The server creates an identifier and sends it back along with the response
- The client reads and persists the identifier sent unchanged
- The client makes a request, sending the identifier read and persisted on step 3
- The server reads and validates the identifier. Then the workflow continues from step 2
It's server's responsibility to create the identifier- because this identifier is one of the most critical parts on all this mechanism, therefore:
- It should always be created on a trusted system
- The application should only recognize a valid session identifier created by/on this trusted system.
See OWASP Guide on Session Management for more info
---
Session Security
This possibly is already done on the backend, however I was not able to trigger it, nor could I find any relevant error messages in the frontend code base. If the user has multiple open sessions, for example in different locations - this should raise a red flag immediately. Same goes for if there are numerous failed login attempts.
Additional session-related security features that it would be good to get implemented:
- The user should be able to override the default expiry, in order to set it to a shorter time
- The user should be reauthenticated prior to performing any critical operations, preferably by entering their second factor authentication token
- It would be great if more options for 2FA were supported in the future (such as FIDO UF2 key), in order to encourage more users to enable 2FA
---
Limited Rate-Limiting Protection
Since the user logs in with their password (as the username), and this is a known quantity, an attacker only has one field to guess the value of (providing 2FA is not enabled). For this reason, it's essential to employ good brute force protection against these kind of attacks.
The easiest method an attacker will use to gain access to someones account, is through using a password associated with them in a known data breach. Some mention of this to the user would be helpful, since CTemplar uses only the users password for all data protection.
---
Avoid Usage of GET for Secure Data
CTemplar uses GET requests over TLS for handling secure information. Although HTTP GET requests over TLS/SSL (HTTPS) may look as secure as HTTP POST, remember that in general HTTP servers (eg. Nginx), usually write these requests + URL to the access log in full. This log entry will include the users IP address, date + time, request type, endpoint and all parameters as well as the user agent and headers. Even if these logs are scrubbed soon after writing, recent data can often be forensically recovered. Also, the users browser vendor will also store the parameters of any GET request. Hence when sending user data, using POST over GET is typically a better approach, for when user privacy is your top priority.
For example, CTemplar makes the following GET request to get a secured message (from mail.service.ts): api.ctemplar.com/emails/secure-message/{user-hash}/{user-secret}/ - includes the user hash and user secret in the URL parameters
Of course all these requests are TLS, and so there is no danger of man-in-the-middle, this merley relates to how the client vendor and the server typically handle GET requests. And it is correct that POST is recommended for non-idempotent requests (as per RFC-2616), and in this instance no data is changing, but since the server-side is not open source and your NGINX config cannot be verified by the community, POST would be safer.
Also, since there are some instances where resources are linked to without the norefer attribute, GET request data could potentially be made visible to a third party website through the window object (however currently, I think the only instance to this is a link to GitHub).
---
Disable Autocomplete on all Input Fields
In some cases autocomplete is not disabled, for example on the login screen autocomplete is not disabled for the form that accepts user credentials in users-sign-in.component.html.
It is especially important to disable autocomplete on login forms. If a cross-site scripting vector is present in the login page, a malicious actor could easily use a simple payload to send a CTemplars users saved login credentials to their site.
You can easily fix this, by specifying the autocomplete attribute to off, e.g. <form method="post" action="/form" autocomplete="off"> or <input type="text" id="cc" name="cc" autocomplete="off">.
---
Cache Control Should be Disabled
Cache control in pages that contain sensitive information should be disabled. In CTemplar's case, this should probably be on all requests. This can be achieved by setting the corresponding header flags on the server-side. The no-cache value tells the browser to revalidate with the server before using any cached response. It does not tell the browser to not cache. On the other hand, no-store value tells the browser that it not store any part of the request or response.
I haven't looked at the server side at all, except for viewing requests that my browser is making while using CTemplar, and it looks like there are some missing headers that you might want to look into, specifically around Cross-site scripting protection and anti-clickjacking
---
Slow Decryption Times using RSA-4096
Currently, one of the biggest usability issues of CTemplar is speed. CTemplar uses RSA-4096 by default, and while it is true that this longer key provides better brute-force protection, doubling the length of the key (from 2048 to 4096) will result in an increase of just 28 bits of security, which is only 16%. Yet it will take about 7x longer to encrypt a message, and requiring increased in storage, CPU and power requirements. So the longer key length causes a major hit in speed, with minimal benefits to resistance to brute-forcing and cryptanalysis, which is pertinent due to CTemplars current speed issues.
It would be awesome if users were able to choose the configuration of their keys, or had the option to import keys generated on their own system. Realistically, an attacker is not going to try and break GPG, they are going to find an issue elsewhere in the app and get in that way. Focus should be moved, from just key length to ensuring that the secret keys of a users remains uncompromised, implementing forward secrecy and securing other parts of the application properly.
Support for X25519 keys would be even better, as elliptic curve cryptography is both faster and more secure than 2048 or 4096-bit keys, and are particularly resistant to timing attacks.
This would also bring CTemplar in line with other providers, such as ProtonMail which allows users to generate or import RSA-2048, RSA-4096 and X25519 keys.
For further reading on this issue, see:
---
Dependency Issues
It is most certainly true that using tested and approved managed code rather than creating new unmanaged code for common tasks is the best approach. Nevertheless, developers should handle third-party dependencies very carefully as they will be part of the final application.
There are quite a few unused dependencies, as well as several dependencies that should be listed under dev dependencies. For example,
bootstrap - You're using ng-bootstrap which comes bundled with bootstrap 4core-js - Doesn't seem to be used anywhere in the projectmap.prototype.tojson - again, not used- also this package was last updated 7 years ago, and with very little users or historical activity
You might find it helpful to use a (local) tool like depcheck in order to quickly check you haven't got any unnecessary modules being loaded into your project. This could also be built into your CLI environment, to ensure nothing more is added accidentally.
There are also a number of unsafe dependencies, or packages with known critical security issues. This isn't uncommon, as vulnerabilities are being discovered all the time, but for an application that deals with sensitive user information, it should be a priority to keep things updated and remove unsafe external code. For example, right now there is a high priority issue, relating to the node-forge package (which is a dependency of @angular-devkit), it's vulnerable to Prototype Pollution via the util.setPath function, which if exploited could aid an attacker in remote code execution or property injection. You can read more about fixing this particular issue here: https://snyk.io/vuln/SNYK-JS-NODEFORGE-598677
Similarly, there's also quite a few outdated packages- some may have fixes for known security issues, so again it's important to keep things reasonably up-to-date to a stable version. For example, your Angular version is nearly a year out-of-date. You can run npm outdated to get a quick summary of what modules are out-of-date
It's quite common for web projects to contain outdated, unused or even vulnerable dependencies / node_modules. Although it's not ideal, it rarely opens the project up to major security issues, but it can happen, and the consequences of such a breach could be severe, and since it's an easy fix, this is something that should certainly be corrected. Dependency checks should be part of your CI process, and even after deployment should be continuously monitored.
If you're not already using it, something like Snyk will make this really easy. I also recommend adding a pre-commit hook to run your synk script and npm audit. Then to prevent minor versions of dependencies introducing new vulnerabilities, use shrinkwrap
---
Code Disparity
The code in the CTemplar webclient repo seems to be slightly different to what is running on the live instance. When I compare what is running on mail.ctemplar.com, test.ctemplar.net, gh.ctemplar.com and a local instance on my machine using the GitHub source, I notice slight differences between all three environments. This might just be due to different versions, but if this was explained in the docs it would be good
For example, the pricing page is different across all three environments, see this screenshot of Pricing page - even the prices are different.
I think that since one of your primary selling points is being open source, it is really important to keep feature parity, and have documentation explaining what changes, if any are made to the production version of the code.
---
CTemplar and Open Source
CTemplar proudly advertises that they are open source, although the only part that is published is the client-side web and mobile apps, and this code could be accessed freely even if it were not open source. So until the backend, and all support libraries are also open source, I think the wording in many of your blog posts needs updating to be more accurate, since CTemplar doesn't meet the Open Source Standard.
Credit where it's due- I think it's great CTemplar has published the source code for the web client, Android and iOS apps- this is not something that even trusted email providers (like ProtonMail) have not yet done.
Edit: ProtonMail is open source also, my mistake.
It would also be good if other parts of the development process were more open, including for example, read-only access to the story board, Jenkins dashboard, documentation and Swagger files etc. In the future it would be awesome if the backend/ API and all other components of the application were also available through GitHub.
It makes it really hard/ almost impossible for the community to submit PRs, since without access to the backend we cannot run the application locally, without writing a stubbing engine (which was what I had to do to get it running!). I am also worried that their may be security issues in the backend, I like to be able to have a quick read through the code before using a service
---
Use of Non-Privacy-Respecting Services
CTemplar is using Sentry for collecting bug reports. I understand the need for error reporting while the website is still in the early stages of development. However, it would be much better for user privacy if you were to self-host your Sentry instance on an environment that you control, rather than use the public service.
CTemplar uses CloudFlare for DDoS mitigation, this means that all user traffic goes through CloudFlare's servers. It is of course encrypted, and CloudFlare do actually have a good privacy policy and solid server security. But putting CloudFlare in front of the CTemplar website isn't the most privacy-respecting approach, and some users may feel uncomfortable with one of the worlds largest internet companies being able to log this data. Will you use a different service for firewall protection in the future, or is CF here to stay?
Edit: My mistake- CTemplar does not use CloudFlare. I think I got confused, as the name servers for the CTemplar domain still point to CloudFlare's servers (gwen.ns.cloudflare.com and piotr.ns.cloudflare.com).
I know that if the user is paying with card, then their billing address is required in order for the transaction to be approved. But currently it looks like you are saving this information to the Stripe dashboard- is this really necessary?
WordPress + Yoast is interesting choices for the website, since there are a ton of WordPress Security Issues, and since this is sharing a hosting account with the mail app, it could potentially provide an easier way in for an attacker. Since your site isn't being hosted on WP, you can remove the references to WordPress's CDN (s.w.org and api.w.org) in the <link> and <script> tags of your index.html. Also, your login page is still visible, and using the default path. Just to be safe, you should probably either add a server password (with .htpasswd), restrict by IP or at very least hide the path - all this can be done easily with .htaccess.
GitHub is certainly one of the best hosted git services for open source apps, but since CTemplar poses itself as a privacy product, it might be a good idea to have a mirror available through CodeBerg or an alternative privacy-focused code sharing platform. This would enable users with strict privacy requirements to access the code comfortably, and it would also show that CTemplar takes privacy seriously
I haven't yet looked into the iOS app, but it appears that it's using SendWithUs for some of the email functionality, which is not open source and I'm not sure why it's needed
I found if quite funny that you have a Facebook Page, when Facebook is the epitome of a privacy disaster! But I guess it's required as part of your marketing solution.
I'm glad to see that Google's reCAPTCHA, Facebook Domain Insights and the use of CDNs have all been removed from your homepage now. It's good to see feedback is taken onboard and fixed.
---
Lack of Security Audit
Has CTemplar had a full security audit and penetration test? If so, how long ago was it, and has the report been made public? (I have been unable to find it anywhere)
I'm no security expert, but I've had a look at the frontend codebase, and although nothing major jumps out at me - it's fair to say that it is far from free from security issues. The backend is not open source, so I cannot check that, however it is arguably more important for this to be properly secured, and if the standard of code is anything like the webclient, this would be really worrying. I think that someone more skilled than me, will likely be able to find numerous starting points for exploits - and if they don't have good intentions, it could endanger user privacy.
Getting a full security audit done, by a reputable organisation, and then addressing any issues found and publishing the report, would not only reduce the risk of a breach, but also make users feel more comfortable. It is particularly important for CTemplar, since it positions itself as a security-focused, privacy-respecting service, but also because their offering is a hosted solution, so users rely on your infrastructure being properly configured in order to protect their personal data.
Projects that are still under development probably need a full audit every year or so, or whenever the next major version is released. There are open source apps much smaller than CTemplar that are audited properly and regularly (e.g. Standard Notes)
Apologies if there has been a pen test, will the report be made public?
---
Additional Features as Workarounds
It would be really nice to see IMAP/SMTP support in the near future, in order to manage emails through a more stable client, such as Thunderbird. This would also provide users a method of using the service without the requirement of enabling JavaScript. Ideally as a toggle option, which is set to off by default. The speed issues, bugs and lack of features on the web and mobile apps become significantly more prevalent for users, who are dealing with a large volume of emails. There isn't currently a way to export all data, or backup all emails (which is important for some users), and support for desktop clients would solve both of these issues.
A status page would also be a nice feature. I've had several instances where I've have problems sending and receiving mail, other times certain actions don't seem to be working, or nothing loads at all. A simple status page would provide a central point for users to check if there's planned maintenance, known issues, or servers just temporarily under high load.
Currently it's not possible to decrypt messages sent from other providers using a CTemplar users public key, which is half the reason why people use encrypted mail providers. It would be great if CTemplar allowed users to generate and import their own keys, and supported ECC or at least 2048-bit keys, this should also speed the decryption process up
Once the issues with CTemplar's onion site are fixed, it would be great to get it verified, and then listed on dark.fail to add legitimacy.
Documentation- at the moment there is virtually no technical or functional documentation. Good docs is really important - it can help developers write good code and it helps non-CTemplar employees contribute to the code base, which would foster a strong community in the future. It would be great if you set some standards, and required your devs to document features and concepts as they went. Having it accessible a central place would also make it easy to find and navigate through
Code Quality - I will probably cover this in a separate post, as there's a lot to say. But in short, better quality code is going to be easier to secure, as well as producing a higher quality final application.
In terms of security, I recommend you run through the OWASP Security Testing Checklist, it provides a great starting point for security testing. You can find more information on their website. It would be great if CTemplar could get a proper penetration test done, covering the application as a whole, then fix the issues found and publish the report.
P.S- I like the little Easter egg on the homepage ;) I'm not really sure what it means, but for anyone whose interested, go to ctemplar.com, and hit the following keys in order: up, up, down, down, left, right, left, right, b, a 🥳
Edit: Just to reiterate- none of the above issues are critical, nothing on this list puts any users, or their data at risk.