I am also a developer and here is my opinion:
The problem is worse than you think
There is no spoon
Development is not about software. Development is about making or improving products, services and processes. Software is an important gear but is not the only one. Good developers will define the processes in the wider sense to know which software components to create as well which human, logistical, risk-management process to propose. Does not make any sense to develop a software system that depends on human, logistical and paper processes that are not implemented.
There are no rules to the development because the development is defining the rules. That is what makes development the worst environment to secure.
But that does not mean some controls should not be established. On the contrary, many controls should be set up by the development team itself.
Engineering process
There are companies that advocate separation between business and technology
in a top-down process. This is actually very popular because suggests that business people with no technical knowledge should be on top. Lazy people love that. But in engineering a top-down design simply does not work. Feyman (1985) made a nice article about that in the presidential commission that analyzed the Challenger explosion. Basically engineering top-down processes eventually break the company. And my market experience reinforce this understanding.
The Challenger explosion is an great example. Nasa managers testify on camera on a inquiry commission that they developed a rubber that can remain flexible under 60 degrees below freezing. A thing that was contradicted by an simple high-school physical experiment made by one of the commissioners (put the rubber component in ice water pressed by a clamp). This was a great example because this rubber component needed to be flexible for the booster not to explode; since it needed summer temperatures to do that, the booster only worked in summer. A characteristic of a single component defines a visible characteristic of the entire product that is very limiting.
Engineering should happen bottom-up because you need to know the limitations and weaknesses of each component to elaborate processes to mitigate them. More often than not, the mitigation processes are not software and will affect the cost of the product. Meaning that the characteristics and limitations of the individual components will define the characteristics of the products, services and processes.
Top-down processes are fundamentally broken. Many companies that adopt this philosophy on paper still have some market success. But when you go down and investigate their big and most successful projects, you learn that they were conducted outside the normal company rules. The biggest successes are attained when one person that have deep engineering knowledge and market-wise vision is informally empowered. Since this happens informally, the management thinks the top-down process works. They brand that all other teams are incompetent. Turning a blind eye for the fact that the initial project outline when it left the "top phase" was completely ignored and does not describes the products, services and processes built.
Your manager can define that you will engineer a teleport device by the end of the month because he concluded that this will allow high profit in the travel business... but that will not make it happen. Top-down projects are like that, set expectations that are not technologically sound.
Do not get me wrong, it is good to see the problem for many angles. Bottom-up, Top-down, SWOT and more are healthy for the analysis, but the genuine engineering effort is bottom-up. There is no genuine goal without technical viability.
Development Security
We got to remember that software developers will change the company software on a regular basis, and, that way, they can: change what appears on the screen of anyone, send automated e-mails to anyone including themselves, or open back-doors to do what they want. Meaning that a criminal hired as a developer can do significant damages to the company.
Worst than that, there are many companies that do not enforce the a source code repository provenience, and then the hired developer can deliver a binary that is different from the source given. This allows criminal developers to hijack the company systems, if they are not hired, the things will stop working soon.
To me development security should focus in:
- Source code version control: to ensure that the source code and third part components needed are stored in a secure location.
- Strategic division of labor: junior and temporary developers must have limited access to the source code and data. They only need access to the components they are changing to avoid a junior developer being able to understand the inner workings of all systems and be able to exploit that.
- Trust the core developers: Senior/Core developers will have to know everything, have access to everything, to plan and distribute the tasks and diagnose severe problems. This core must have access to the whole thing, both in the development and production. They are your partners in the development of the security policies. We must accept that the core developers sort-of own the company. My old boss used to say: "we are lucky Lucas is on our side, on the other side he would destroy us". Core developers can do a lot of damage if they want and there is no firewall and production control that can prevent that.
- Separate the environment through firewalls: separate your development network, from your test network, from your production network. On a company I defined the network 10.1. as development, 10.2. as testing and 10.3. as production. The 10.2 and 10.3 networks only receive code through the corporate CVS and build them automatically upon the admin command. Although it was a small startup and I was in the production and in the development teams, I made some bureaucracies to avoid my own mistakes (developers can be your best allies). I also did change the terminal colors by network: when connecting in a production server the terminal background was red, testing was yellow and development green. Since all my servers used the same configuration it was easy to confuse them if the prompt was open. To my experience most problems come from badly tested software and new software installations. To make clear: where you are is a powerful security feature in my opinion. It has nothing to do with access, but it is security.
- Hire an skilled test developer: The key aspect in testing is to have large amounts of good simulated data that is meaningful to the problems that the company face. Monte-Carlo simulations are good to generate large datasets that has meaning to other developers and can lead to stronger and resilient software and processes. To me there are no "production" failures, the developer is always to blame. The maintenance tasks and contingencies have to be written. Software has to be resilient.
- Source code review: have people to review the source code before accepting the modification. All projects should be branched on the source code control and the merge should be reviewed. The source code review should only bother with malware detection, access escalation, access profiles and a good explanation of what the source code means and should do. The quality of the code will be assured by the testing, not the source code review. You can see this in action in most open source projects.
- Test policies tests are much more a corporate culture than a framework. Some companies adopt market frameworks, do some testing, but the quality of their code is bad. That happens because you need people capable of engineering meaningful tests. Actually the development must become test driven. I know no other secure way of development. And a curious thing is that humans, purchases, and consulting all have to be tested also. Vendors often claim their products perform flawlessly, but I did not found a flawless product yet.
- Policies are meaningless if not monitored. One company I know have a bureaucracy that every database table should have a description on the attribute level. 95% of the attributes are described as "the ${attribute name} of ${table name}". It does not explain what the attribute really is, what values may hold and stuff.
- Appropriated compensation and work environment. To have good developers, both in skill and personality you have to have good compensation policies. Money is important, of course, but is not enough. You also need to have perspective/stability, true recognition and a good work environment. For example, instead on a development office in New York where people live in small apartments, you can choose a smaller city where the same compensation allows for a bigger house and more proximity to the work. Bigger computers, good laboratories are also a plus for technology enthusiasts.
- Data security many activities require sensitive production data, and should be accessed in a special lab. Unless you information is public or not sensitive, maybe the best policy is to put labs in good neighborhoods with controlled physical access. Allow only some simulated data to be put on personal laptops and components that are not sensitive. That is possible. For example, I developed an 4.5 billion records heavily accessed data archive for a company. I did in my home and used absolutely no company data to that end. When I submitted the code it worked as expected in the first attempt. Other than hardware failure and migration of production environments we have 100% of availability in 10 years. The risk of the developer take the source code with him is not relevant. This particular system took me 3 months to develop, a great deal of this time was to understand the performance limitations of the components. This is now knowledge inside my head. Even without the source code I can re-develop this solution in about a week now.
- Strong logs are important to know everyone that did something. The best here is for the logs to be generated by a framework, logging for short time detailed screens, for longer times access and activities and even longer the corporate logs. My critical systems logs for every time a screen is accessed (including the design of the screen). Some of the critical resources should be logged by a trigger on the database itself and the critical tables or resources should be flagged for source code auditing.
-Log screening is difficult to do by hand. Learn how to make filters on the logs to see critical things. One very useful filter is to cross complaint reports with user access and activities. If you have good enough logs you will see coincidences. For instance: before a problem user1 always logins.
About not accessing production
The rules that require the developers not access production systems as users are there to avoid developers from submittin code to show to his/hers own user privileged information. I think this is a very, very weak security measure and easy to detect in source code auditing. There is several easy ways to circumvent that:
- a developer plus one low paid employee;
- send himself an e-mail;
- open a back-door in the system.
Source code auditing looking for backdoors, access escalation and malware seems more productive. It allows to identify the bad developers when they are testing their exploits and fire them. Of course a skilled developer can hide an exploit in plain sight, therefore it is important to use languages and variable names plain and clear. Only resort to weird solutions in documented points of the applications that need special performance or obfuscation. For example, 1 << 4 is the same as 1 * 16. This only would made sense if the language does not make this optimization by itself and the point where it happens is a performance bottleneck. Too symbolic languages are bad for this very same reason. Source code should be readable by any geek.
The problem is worst than you think
The easiest and worst damages a developer can cause are not related with tool installation. Even if the development environment is managed, will make little difference if the company does not have strong firewalls, source code repositories, builds based exclusively on the source code repositories and code review.