隨者資安意識的提升, Container Image 的安全性檢查變得愈來愈重要,最基本的想法就是針對 Image 本身去檢查是否有任何已知的 CVE 與 vulnerabilities,透過這類型的機制來確保我們要部署到生產環境的 Container Image 是足夠安全的。
目前至少有三種方法可以來達成這目標,第一種是直接使用相關的 CLI 工具掃描,第二種是將工具整合到 Container Registry 中,根據情況自動掃描,第三種則是將工具整合到 CI/CD pipeline 過程中,只有符合標準的 Container Image 才有資格被推到團隊所使用的 Container Image。
本文作者透過 Trivy 以及 GitlabCI 等工具來示範如何於 CI/CD pipeline 中完成 image 的安全性檢查(也就是方式三)。
# 重點整理
1. Trivy 掃出來的安全性有四種,分別是 Low, Medium, High 以及 Critical
2. Trivy 本身不定義什麼樣的結果叫做安全或不安全,完全是根據使用者自己決定。作者認為這個標準取決於團隊對於資安的重視性。範例中,作者定義只要有任何一個 Critical 等級的安全性漏洞,就將該 Image 視為不安全
3. 透過 Gitlab CI 的流程,來建置 Container Image,並且透過 Trivy 掃描,如果不符合安全定義就透過 exit-code 來結束該 stage,同時也會將 Trivy 的掃描結果給一併上傳。
如果對於(2)透過 container registry 來掃描的,可以參考我今年針對 ITHOME 鐵人賽所撰寫的文章: https://www.hwchiu.com/ithome/2020/registry/day21.html
原文:
https://medium.com/alterway/adding-image-security-scanning-to-a-ci-cd-pipeline-2faff072d
html image 置中 在 Eric's English Lounge Facebook 的最讚貼文
[時事英文] 10句話幫你快速看懂歐洲難民危機 (The European Refugee Crisis)
★★★★★★★★★★★★
1. There can be no tolerance of those who question the dignity of other people. There is no tolerance of those who are not ready to help, where, for legal and humanitarian reasons, help is due.
不能容忍那些質疑別人的尊嚴的人。 不能容忍那些沒有準備好幫助人的人,因為在這裡基於法律和人道因素去幫助是應該的。
- Angela Merkel, German Chancellor
★★★★★★★★★★★★
2. The 2015 European refugee crisis arose through the rising number of refugees and economic migrants seeking asylum in the European Union.
2015年歐洲難民危機是由於越來越多的難民和經濟移民尋求庇護所引起。
European refugee crisis 歐洲難民危機
seek asylum 尋求庇護
★★★★★★★★★★★★
3. The migrants attempt to escape war and poverty in their native countries and come to Europe seeking a better life.
移民試圖在擺脫他們祖國的戰爭和貧窮,來到歐洲尋求更好的生活。
escape poverty and war 擺脫貧困和戰爭
seek a better life 尋求更好的生活
★★★★★★★★★★★★
4. Between 2007 and 2011, an influx of undocumented migrants from the Middle East and Africa crossed between Turkey and Greece. In response, fences along crossing points to Europe were constructed to stem migrant flows.
2007年至2011年,來自中東和非洲的無證移民湧入土耳其和希臘之間的交叉。對此,少數國家在通往歐洲的過境點建立柵欄以阻擋移民湧入。
an influx (n.) of migrants 移民湧入
crossing points 過境點
stem migrant flows 阻擋移民湧入
★★★★★★★★★★★★
5. The lack of a central authority controlling in many war-torn nations have allowed migrant smuggling networks to flourish.
許多飽受戰爭蹂躪的國家缺乏中央權力機構的控制導致很多移民偷渡集團蓬勃發展。
war-torn nation 飽受戰爭蹂躪的國家
migrant smuggling networks 移民偷渡集團
smugglers 走私者
★★★★★★★★★★★★
6. On 28, August 2015, the world was shocked as 71 refugees - including four children - were found dead in the back of a freezer truck in Austria. A Bulgarian-Hungarian human trafficking ring was believed to be behind the deaths.
在2015年8月28日,在奧地利被發現71個難民(包括四個孩子)死在冷凍卡車的後面,此事件震驚了全世界。一個位於保加利亞的匈牙利販賣人口集團被認為是此死亡事件的幕後主謀。
human trafficking ring 販賣人口集團
behind the deaths 死亡(事件) 的幕後
★★★★★★★★★★★★
7. The images of the body of Aylan Kurdi, a three-year-old child, on a Turkish beach have reverberated across the globe, stirring public outrage and shamming political leaders of countries that had rejected an asylum application from the boy’s relatives.
在土耳其海灘照片裡的屍體是一位3歲孩子叫 Aylan Kurdi,此事件震驚了全球也激起了公眾的憤怒,也羞辱了那拒絕男孩親戚提出的庇護申請之該國領袖。
reverberate 迴響
stirring public outrage 攪拌眾怒
rejected asylum application 拒絕庇護申請
★★★★★★★★★★★★
8. The United Nations has stated the European Union must accept 200,000 refugees as part of a "common strategy" to replace its country-by-country response to the sudden surge of refugees.
聯合國聲明歐盟必須去接收20萬難民作為“共同戰略”以取代單一國家安置蜂擁而來的難民的籌略。
sudden surge of refugees 難民數量突然飆升
★★★★★★★★★★★★
9. British Prime Minister David Cameron, who earlier had said that simply accepting more refugees was not the solution to the migrant crisis, has said the U.K. will resettle thousands more Syrians fleeing the fighting in their homeland.
英國首相戴維•卡梅倫曾表示,僅僅接受更多的難民不是解決移民危機,但現在表示將重新安置數千多逃離家園戰鬥的敘利亞人。
migrant crisis 移民危機
resettle thousands of refugees 安置數千的難民
★★★★★★★★★★★★
10. By contrast, German Chancellor Angela Merkel has consistently taken a firm stance on migration - making it clear she feels it is her country's duty to help those genuinely claiming asylum from war-torn countries and calling on Europe to step up and share responsibility for the huge number of people moving across the region.
相對來說,德國總理默克爾一直採取對於遷移堅定的立場,她覺得這是她國家的責任去幫助那些飽受戰爭蹂躪的國家且給予要求的庇護,並呼籲歐洲加強和分享在該地區移動的眾多人們的責任。
take a firm stance 採取堅定的立場
duty to help 有責任幫助
calling on Europe to step up…呼籲歐洲加強…
★★★★★★★★★★★★
What can you do to help?
http://www.cw.com.tw/article/article.action?id=5070631
Sources:
http://www.huffingtonpost.co.uk/2015/09/01/angela-merkel-immigration-migrants-germany_n_8069928.html
http://www.npr.org/sections/thetwo-way/2015/09/04/437468267/u-n-calls-on-european-union-to-accept-200-000-refugees
http://www.chroniclelive.co.uk/news/north-east-news/eu-migrant-crisis-timeline-how-9988488
http://www.wsj.com/articles/image-of-syrian-boy-washed-up-on-beach-hits-hard-1441282847
http://www.mirror.co.uk/news/world-news/austria-freezer-truck-deaths-police-6336740
http://www.theglobeandmail.com/news/world/hungary-building-a-fence-to-block-out-migrants/article25529233/
Image source: http://www.theargus.co.uk/resources/images/4193115/
html image 置中 在 [CSS] 圖片在div內水平置中 - 程式設計@筆記 的相關結果
圖片在div內置中--><img src="圖片網址" style="display:block; margin: ... <看更多>
html image 置中 在 [筆記] CSS垂直置中的方法 - PJCHENder 的相關結果
在學習網頁排版的過程中,置中(不論垂直或水平)一直是個相當麻煩的事,關於CSS中 ... 以下是之後示範中HTML Body 的部分: ... 文字的垂直置中方法. ... <看更多>
html image 置中 在 CSS垂直置中的辦法 - 鬼谷網頁設計 的相關結果
CSS垂直置中教學,製作CSS最常遇到的問題就是對齊,上下跟左右都要 ... HTML. <div class="shape-ex2"> <div class="shape-ex2-block"></div> </div>. ... <看更多>