HP 的 open source 專案「Go AST Scanner」,分析 Go 的原始程式碼拉出 AST 進行分析 (Static program analysis),再找出可能的安全性問題。
雖然是 alpha 階段,但看起來是個好東西啊... 至少寫的太誇張的 SQL injection 可以掃出來。
幹壞事是進步最大的原動力
HP 的 open source 專案「Go AST Scanner」,分析 Go 的原始程式碼拉出 AST 進行分析 (Static program analysis),再找出可能的安全性問題。
雖然是 alpha 階段,但看起來是個好東西啊... 至少寫的太誇張的 SQL injection 可以掃出來。
MIT 弄出來的新玩意,靜態分析工具叫做 Space:「New MIT Scanner Finds Web App Flaws in a Minute」,MIT 官方的報導在「Patching up Web applications」這邊:
In tests on 50 popular Web applications written using Ruby on Rails, the system found 23 previously undiagnosed security flaws, and it took no more than 64 seconds to analyze any given program.
接下來就是什麼時候會放出來了...
之前有提過這件事情,由於 Firefox 已經支援 Brotli 了 (Google 推出 Brotli 無損壓縮法),所以 CloudFlare 的人整理了目前的效能比較:「Results of experimenting with Brotli for dynamic web content」。
主要還是 Brotli 拿了不少資源來換壓縮率,對於 static content 由於可以事先算好而大勝不少 (大約可以再榨出 15% 的壓縮率,從 zlib 9 的 27.7% 降到 brotli 10 的 23.3%):
The current state of Brotli gives us some mixed impressions. There is no yes/no answer to the question "Is Brotli better than gzip?". It definitely looks like a big win for static content compression, but on the web where the content is dynamic we also need to consider on-the-fly compression.
另外對於大檔案、網路速度不快的連線來說也頗有幫助,但對於 on-the-fly 的壓縮反而會比較慢。
這應該是昨天很熱鬧的新聞,也不難看出 Oracle 對資安的心態。
參考「Oracle to 'sinner' customers: Reverse engineering is a sin and we know best」這篇報導,Oracle CSO Mary Ann Davidson 發表的原文已經被刪除,但這是 internet 時代,當然有完整的備份下來:「No, You Really Can’t (Mary Ann Davidson Blog)」。
提供給 ZDNet 報導的補充是:
The security of our products and services has always been critically important to Oracle. Oracle has a robust program of product security assurance and works with third party researchers and customers to jointly ensure that applications built with Oracle technology are secure. We removed the post as it does not reflect our beliefs or our relationship with our customers.
Oracle 的公關能力一如往常的優秀!
Facebook 推出了靜態分析工具 Facebook Infer,可以事先找出 Android 與 iOS 上的 bug:Open-sourcing Facebook Infer: Identify bugs before you ship。
從官方給的操作動畫中就可以看出來怎麼跑了。目前看起來支援三種程式語言,C、Objective-C、Java:
Facebook Infer is a static analysis tool - if you give Infer some Objective-C, Java, or C code, it produces a list of potential bugs.
在 Android 上 (Java) 會找出的類型:
Infer reports null pointer exceptions and resource leaks in Android and Java code.
iOS 上則只找 memory leak:
In addition to this, it reports memory leak problems in iOS and C code.
比較特別的是,這個工具是用 OCaml 寫:
Infer is a static analysis tool for Java, Objective-C and C, written in OCaml.
把十年多的 BBS source code porting 到 Ubuntu 上,被迫要用 GCC 4.6 而一路找出來的...
在 BBS 內有這樣的資料結構要處理:
typedef struct p { struct p *pointer; } P; static P p1 = { &p2 }; static P p2 = { &p1 };
兩個要互指,但在指定 p1 時 p2 還沒有被定義,所以要用 extern 先宣告:
typedef struct p { struct p *pointer; } P; extern P p2; static P p1 = { &p2 }; static P p2 = { &p1 };
這個語法在舊版的 GCC 沒問題 (3.4),但在新版的 GCC 4.6 上不接受這個寫法,會抱怨後面的 p2 實際在宣告是 static,與前面的 extern non-static 不符。
後來在 Stack Overflow 上找到「static extern vs extern static」這篇說明,要先定義 static 再定義 extern:
static P p2; extern P p2;
這樣寫的原因在原文的下方有說明,所以是 C99 定義的關係?