Secure Coding Guideline

http://wiki.developerforce.com/page/Secure_Coding_Guideline

Secure Coding Guidelines

The following documentation walks you through the most common security issues salesforce.com has identified while auditing applications built on or integrated with Force.com. This documentation takes into account that many of our developers write integration pieces with the Force.com platform and includes examples from other web platforms such as Java, ASP.NET, PHP and Ruby on Rails. The Force.com platform provides full or partial protection against many of these issues. It is noted when this is the case.

Consider this to be an easy to read reference and not a thorough documentation of all web application security flaws. More details on a broader spectrum of web application security problems can be found on the OWASP (Open Web Application Security Project) site.

After you feel comfortable with the topics here, please utilize the tools we are making available which will help in identifying many of these types of issues.


1. Cross-Site Scripting
2. S(O)QL Injection
3. Cross Site Request Forgery
4. Secure Communications and Cookies
5. Storing Secrets
6. Arbitrary Redirects
7. Access Control
8. Enforcing CRUD and FLS (Force.com)
9. SSO for Composite Apps

 

C和C++的安全编码是指在编写C和C++代码时,采取一系列的措施来确保代码的安全性和防止常见的安全漏洞。由于C和C++是底层的编程语言,它们允许对内存直接进行操作,这也使得它们容易受到各种安全威胁的攻击。 在进行安全编码时,有几个关键的原则需要遵循。首先是验证输入。由于输入数据往往是来自外部,我们需要对输入进行验证,以确保它们符合预期的格式和范围。这样可以防止缓冲区溢出和格式化字符串漏洞等攻击。 其次,应该正确地管理内存。C和C++允许直接控制内存的分配和释放,但这也意味着需要手动管理内存的生命周期。如果没有正确地分配和释放内存,会导致内存泄漏和非法内存访问等问题。因此,务必要仔细检查并指定正确的内存操作。 此外,还应注意避免使用不安全的函数和功能。一些函数和功能可能存在安全风险,如strcpy和scanf等。应该使用更安全的替代函数,如strncpy和fgets等,以提高代码的安全性。 最后,代码的安全性也需要经过不断的测试和审查。通过进行静态代码分析和动态测试,可以发现和纠正代码中的潜在安全问题。此外,代码审查也是非常重要的,通过互相审查可以找到潜在的漏洞和错误。 总而言之,C和C++的安全编码需要遵循验证输入、正确管理内存、避免使用不安全函数和功能以及进行测试和审查等原则。只有通过采取适当的安全措施,才能确保代码的安全性并防止潜在的安全漏洞。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值